QxTransformer - Global Widget Definition

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

QxTransformer - Global Widget Definition

Fru Ndenge
Hallo,

I will like to define a "popup" to be accessed globally i.e. from the main application class and all dependent components.


                <qxt:script>
                <qx:popup id="loading" height="100" width="100" autoHide="false" >
                        <qx:canvas>
                                <qx:atom padding="10" label="LOADING_PLEASE_WAIT" backgroundColor="white" icon="images/redirect-tr.gif" />
                        </qx:canvas>
                </qx:popup>
                </qxt:script>

Where should I place the code so as to be able to invoke "loading.xxx" from any part of my application?

Regards,
Fru
Reply | Threaded
Open this post in threaded view
|

Re: QxTransformer - Global Widget Definition

Siarhei Barysiuk
Hello,

You don't need to use qxt:script in this case, just leave a qx:popup  
and add qxt:scope="global" to it. But it's not very good idea to use  
global variables. I would create a component and extend it from a  
class which provides a static method returning an instance (like a  
singleton).

Cheers,
Siarhei


On Jul 4, 2010, at 8:03 AM, Fru Ndenge wrote:

>
> Hallo,
>
> I will like to define a "popup" to be accessed globally i.e. from  
> the main
> application class and all dependent components.
>
>
> <qxt:script>
> <qx:popup id="loading" height="100" width="100" autoHide="false" >
> <qx:canvas>
> <qx:atom padding="10" label="LOADING_PLEASE_WAIT"
> backgroundColor="white" icon="images/redirect-tr.gif" />
> </qx:canvas>
> </qx:popup>
> </qxt:script>
>
> Where should I place the code so as to be able to invoke  
> "loading.xxx" from
> any part of my application?
>
> Regards,
> Fru
> --
> View this message in context: http://qooxdoo.678.n2.nabble.com/QxTransformer-Global-Widget-Definition-tp5252621p5252621.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel