Hi Stefan, for me at least, QxTransformer is incredibly useful because I am a very lazy coder and always under time pressure. I can always reuse code without having to think of name conflicts of the temporary variables. Together with event and message programming, I can almost completely do away with variable names and write a lot of self-contained logic that is structured in xml-modules. This is, of course, also possible in pure javascript, but much easier this way. You can check out the xml source code of the app here:
https://bibliograph.svn.sourceforge.net/svnroot/bibliograph/bibliograph/trunk/frontend/source/xml/ Cheers, Christian Fa. Linstep, Stefan Volbers schrieb: > Wow, thanks! > > I'm gonna look into this in the evening; sure it helps a lot. > > I must admit that QxTransformer appears to be a mighty tool if you > built your entire bibliography app upon it. > > Thanks again, > > Stefan > > Christian Boulanger schrieb: > >> <qx:popup >> height="auto" width="auto" autoHide="false" >> onAppear="this.centerToBrowser()"> >> <qx:atom >> border="outset-thin" >> padding="10" >> icon="icon/16/actions/ajax-loader.gif" >> label="Loading, please wait..." >> backgroundColor="white"> >> <qx:messageSubscriber >> filter="qcl.databinding.messages.rpc.*"> >> <![CDATA[ >> var status = message.getName(); >> var timestamp = message.getData() >> var queue = this.getUserData("queue") || []; >> switch ( status ) >> { >> case "qcl.databinding.messages.rpc.start": >> queue.push(timestamp); >> break; >> case >> "qcl.databinding.messages.rpc.end": >> for (var i=0; i<queue.length; i++) >> { >> if (queue[i]==timestamp) >> { >> queue.splice(i,1); >> } >> } >> break; >> } >> this.setUserData("queue",queue); >> if (queue.length) { >> this.getParent().show(); >> } else { >> this.getParent().hide(); >> } >> ]]> >> </qx:messageSubscriber> >> <!-- clear queue and hide popup --> >> <qx:eventListener type="click"> >> this.setUserData("queue",[]); >> this.getParent().hide(); >> </qx:eventListener> </qx:atom> >> </qx:popup> >> translated into javascript, this is: > [...] > >> So each and every request made to the server goes through this and >> the corresponding start and end messages are dispathed. This is the >> great advantage of using messages instead of events in some cases - >> the messages can be intercepted everywhere- you do not have to know >> which object is dispatching as in the case of events. >> >> Best, >> >> Christian >> >> >> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel