Hello,

for qxtransformer, we are thinking about adding the XUL 
broadcaster/oberserver feature:

http://developer.mozilla.org/en/docs/XUL_Tutorial:Broadcasters_and_Observers 


<qx:broadcaster id="broadcaster1" enabled="true" />

could then be hooked up to widget like so

<qx:button id="button1" observes="broadcaster1" />
<qx:button id="button2" observes="broadcaster1" />

The way we are thinking to implement is to create a class for each 
broadcaster and define the properties that exists as attributes in the 
broadcaster node with change events, and then add event listeners to 
instances of the broadcaster classes which manipulate the corresponding 
properties in the linked widgets.

We are unsure, however, how to do this in qooxdoo version 0.7. It seems 
like qx.Class.define() requires a single declaration per file and it 
might also have other side effects during the compile process. Is this 
the way or is there a recommended way to dynamically create classes at 
runtime - we don't want to create a hack but a solution that fits into 
the qooxdoo architecture.

Thanks,

Christian

which would add

broadcaster1.addEventListener("changeEnabled",function(event){
   this.changeEnabled(event.getData());
}, );

broadcaster1 being an instance of the showcase.broadcaster1 class

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to