On Fri, Jun 11, 2010 at 15:47, ulr00t <[email protected]> wrote:

>
> Hello, first of all, thanks to whoever made this a wonderful project to
> work
> on :)
>
> My problem is the following one:
>
> I want to open a window I've created outside of "main" (the reason is that
> I'd like to not overload "main" and I'd like to organize better the code),
> but not yet, just create it.
> See how is it:
>
>        createAboutBox : function()
>        {
>        var win = new qx.ui.window.Window("Acerca de...",
> "resource/masterstore/dialog-apply.png");
>

Instead of the above assignment to a local variable called win, assign it to
a variable of your application instance:

  this.win = new qx.ui.window.Window("Acerca de...",
"resource/masterstore/dialog-apply.png");

Then in main:

btnAyuda.addListener("execute", function(e) {
>                win.open();
>      });
>

instead of the above, you want to specify that the listener function is to
execute in the context of your application object by passing a 3rd parameter
to addListener, and then you can access this.win:

btnAyuda.addListener("execute", function(e)
 {
      this.win.open();
 },
this);

You should be all set then.

Derrell
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to