>       var m1 = new QxMenu;
>
>       var mb1_01 = new QxMenuButton("New", null, c1);
>       var mb1_02 = new QxMenuButton("Open", null, c1);
>       var mb1_03 = new QxMenuButton("Save", null, c1);

simply using the variables?

var c1 = new QxCommand();
c1.addEventListener("execute", function(e) {
  if (e.getData() == mb1_01) {
    ...
  }
});


Ralf Wenske wrote:
this might be a javascript question (not yet my native language) :)

is it possible to retrieve the object name from inside an eventhandler?

Example: ToolBar_3.html


      var c1 = new QxCommand();
      c1.addEventListener("execute", function(e) {
        this.debug("Execute: " + e.getData().getLabel());
      });


      var m1 = new QxMenu;

      var mb1_01 = new QxMenuButton("New", null, c1);
      var mb1_02 = new QxMenuButton("Open", null, c1);
      var mb1_03 = new QxMenuButton("Save", null, c1);

Instead of the label I would like to access the name (id?) of the button eg: mb1_02 . I have managed to retrieve the hashCode - can that be used to determine the object name? I want to avoid having to use UserData just to determine which button was clicked (in this example).

It ought to be really simple - I've tried a lot but seem to miss the obvious...

Can anyone help please?

Thanks - Ralf


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to