Hi Everyone

I am having problem with focus handling in text Field. I want to check whether 
the typed value is smaller than 100 and if not put focus back to that text 
Field.
Unfortunately this does not seem to work. Please have a look at the code below. 
Any idea what I am doing wrong?

qx.Class.define("test.Application",
{
  extend : qx.application.Standalone,

  members :
  {
        __percentageInputValueCheck : function(e){
                if(e.getData() > 100){
                        this.__percentageTextField.focus();
                }
        },

    main : function()
    {
      this.base(arguments);

      if (qx.core.Variant.isSet("qx.debug", "on"))
      {
        qx.log.appender.Native;
        qx.log.appender.Console;
      }

                this.__percentageTextField = new qx.ui.form.TextField("");
                this.__percentageTextField.addListener("changeValue", 
this.__percentageInputValueCheck, this);
                this.getRoot().add(this.__percentageTextField, {top: 100, left: 
150});
                this.__applyButton = new qx.ui.form.Button(this.marktr("OK"));
                this.getRoot().add(this.__applyButton, {top: 130, left: 150});
    }
  }
});
S pozdravem / Best regards,

Monika Falk, Software Specialist



------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to