http://n2.nabble.com/Keypress-tp4522540p4522881.html
Am 06.02.2010 09:28, schrieb [email protected]: > Hello, > > i try to catch a key in a window see code below. > > at this codesegment: > this.__username.addListener("keyup", function(e) { > alert(e.getType()); > alert(e.getCharCode());// getKeyCode() , getCharCode() > }); > > i get the type but the keycode or keychar not foud > error is: > > e.getCharCode is not a function > > > > > long code: > > qx.Class.define("job.system.Login", { > extend: qx.core.Object, > members : > { > __prepareeffect : null, > __closeeffect : null, > __openeffect : null, > __container : null, > __okButton : null, > __win: null, > __username: null, > __password: null, > > checkInput : function() > { > > > ....... > > /* Text fields */ > this.__username = new qx.ui.form.TextField(); > this.__password = new qx.ui.form.PasswordField(); > > this.__container.add(this.__username.set({ > allowShrinkX: false, > paddingTop: 3 > }), {row: 0, column : 1}); > this.__username.focus(); > > this.__container.add(this.__password.set({ > allowShrinkX: false, > paddingTop: 3 > }), {row: 1, column : 1}); > > > // create the form manager > var manager = new qx.ui.form.validation.Manager(); > > this.__username.setPlaceholder("Username"); > this.__username.setRequired(true); > // create a validator function > var __usernameLengthValidator = function(value, item) { > var valid = value != null&& value.length> 2; > if (!valid) { > item.setInvalidMessage("Bitte geben Sie einen > Usernamen mit mindestens 3 Buchstaben ein."); > } > return valid; > }; > > // add the username fields with the notEmpty validator > manager.add(this.__username, __usernameLengthValidator); > this.__username.addListener("keyup", function(e) { > alert(e.getType()); > alert(e.getCharCode());// getKeyCode() , getCharCode() > }); > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > -- Christian Schmidt Software Entwickler 1&1 Internet AG - Web Technologies Ernst-Frey-Straße 9 · DE-76135 Karlsruhe Amtsgericht Montabaur / HRB 6484 Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver Mauss, Jan Oetjen Aufsichtsratsvorsitzender: Michael Scheeren ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
