famo.us: how to handle textbox.onchange events -


I do not see any tutorials with text input on famo.us university. How can I add a text box surface to my app and how to handle onchange events

It's a little hard to understand what you are going to do. But start with your first question. There is currently no an on-hander handler option, if you want it now, you can write the subclass of InputSurface. While overriding the deployment function, while still calling the InputSurface deployment function, we can add our functionality, without much messing!

Here's a way you can add an on-line handler to the subclass of Inputsfus. Just remember that the Intersurfaces change again after the blurring.

Good luck!

  var requires engine = ('famous / core / engine'); Var Surface = is required ('famous / core / surface'); Var Statmodififier = Required ('Famous / Modifier / State Modifier'); Var event handler = Required ('famous / core / event handler') var inputsfurfus = ('famous / surface / input page') function MyInputSurface (options) {InputSurface.apply (this, logic); This.onchange = options.onchange; This._superDeploy = InputSurface.prototype.deploy; } MyInputSurface.prototype = Object.create (InputSurface.prototype); MyInputSurface.prototype.constructor = MyInputSurface; MyInputSurface.prototype.deploy = Function Deployed (Target) {target.onchange = this.onchange; This._superDeploy (target); }; Var Reference = Engine.createContext (); Var onchangeFunction = function () {console.log ("text changed!"); } Var myInput = new MyInputSurface ({size: [200,60], onchange: onchangefunction}) context.add (new state modifier ({origin: [0.50.5]}. Add (myInput);  

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -