Laurent Donstetter schrieb:
Of course.
The snippet below is from the examples on your site.
It handles well wheel and arrow click events but not direct input in the
box.

Mhh, the example Spinner_1.html seems to work well here. Just tested using IE6(XP) and Firefox 1.5.


Why do we have to write s3._manager.addEventHandler and not
s3.addEventHandler ? When I write only s3.addEventHandler, arrow clicks and
wheel events are not working any longer. (XP Pro/IE6/Firefox).

Event listeners shouldn't have any negative effect on the functioning of qooxdoo widgets if they don't produce any errors.

Sebastian



Laurent.


window.application.main = function()
  {
var d = this.getClientWindow().getClientDocument(); var s3 = new QxSpinner; with(s3)
    {
      setLeft(180);
      setTop(64);
      setValue(0);
      setMin(-3000);
      setMax(3000);
    };
d.add(s3);
    d.add( (new QxLabel("3000").set({left:180, top:48})) );
    d.add( (new QxLabel("-3000").set({left:180, top:90})) );
s3._manager.addEventListener("changeValue", function(e) {
      alert("Value: " + e.getData());
    });

};
-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Sebastian
Werner
Envoyé : mardi 21 février 2006 14:05
À : [email protected]
Objet : Re: [qooxdoo-devel] Event handling doc

Laurent Donstetter schrieb:
Thank you for the quick reply !
QxSpinner is cool for what I wanted to do.

Now I have another problem. I looked at the demo examples on your site to
see how to attach a handler to a change of value (either directly in the
box
or with the wheel or with the arrows) and the code shows a "changeValue"
event but it doesn't seem to work. Can you help please ?

changeValue should work. Could you send us an small example which shows the problem?

I know this would be much work but an event reference for each widget
would
be very helpful for newbies like me.

Yes this is true. We really need one. Any help is really appreciated in this area. qooxdoo is just another open source product with the typical problems ;)

Sebastian

Thank you,
Laurent.


-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Sebastian
Werner
Envoyé : mardi 21 février 2006 10:53
À : [email protected]
Objet : Re: [qooxdoo-devel] Event handling doc

Laurent Donstetter schrieb:
Hi all,
Are there any documentation or examples about event handling, list of available event for each class... ? Basically I want a QSTextField to accept only int values, ie checking that only numbers are being typed in and that there is no overflow. Is there anything built-in to handle that or do I have to implement it myself with event listeners ?
You can use a QxSpinner instead. It does also support ranges for integer values.

Otherwise you need to implement it your own. Probably in a seperate class which you can contribute to the community?

I used to write it very simply in standard javascript with a keypress event handler returning false if last typed character was not a number or if it throwed an overflow exception... How can you do it with QooXdoo
?
In my opinion keypress is general a bad idea to handle this stuff because there are many actions like insert, cut, copy which you couldn't handle with this method. In qooxdoo you have a "input" event which is much more advanced than a simple keypress.

yourTextField.addEventListener("input", function(e) {
   this.setValue(parseInt(this.getRuntimeValue()));
});

Hope this helps.

Sebastian


Thanks,
Laurent.
Laurent Donstetter - SI-Factory
Téléphone : 06.70.68.37.63
Email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
**************************************************************************
Ce message et toutes les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires.
Toute utilisation ou diffusion non autorisée est interdite.
Tout message électronique est susceptible d'altération.
Nous déclinons toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié.
Ce message et ses pièces jointes ne contiennent, a priori, pas de virus.
Il est de votre responsabilité de vous en assurer avant de les ouvrir.

----------------------------------------------------------------------------
--------------
This message and all attachments are confidential and intended solely for the recipients.
Any unauthorized use or dissemination is prohibited.
E-mail is susceptible to tampering.
We decline all responsability for the message if tampered, changed or falsified. We believe, but do not warrant, that this message and all attachments are virus free.
You should take full responsability for virus checking.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.12/265 - Release Date:
20/02/2006



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to