"Steve Ramage" <[EMAIL PROTECTED]> writes: > Okay my next question would be a generic design question. Lets say I was > developing an IM application with Qooxdoo. So I would have a chat window but > it would be possible to have more than one chat window open at time. How > using Qooxdoo would I keep track of them? > > So lets say I have on each window an input text field, a chat text field, > and a username text field. > > One thought is to have a class that separates my AJAX calls from the User > Interface. When a new window is open each of the text fields would be passed > by reference to this master class and this class would keep track. When a > response from the server came back it would match up an ID, locate the > objects and manipulate them that way. When the window was closed I would > have another function remove reference to them such that any further > requests would simply be silently ignored. > > The previous application merely suffixed the id to the end of every DOM > element so it was easy to track. i.e. it would merely find > chat_text_area_204. Ideally I'd like the most manageable and intuitive way > possible.
This is the type of application that the Finite State Machine is ideal for. Take a look at qx.util.fsm.FiniteStateMachine and its related classes. I think I wrote an example program also... probably examples/Fsm_1.html. Cheers, Derrell ------------------------------------------------------------------------- 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
