John Spackman-3 wrote > Looking at your first post, the reason that “changeModel” was not > supported is because formModel will have events for changing each > individual property, not an event for any/all changes to the properties; > so for this code: > > var formModel = qx.data.marshal.Json.createModel({ > text: null, > combo: null, > select: null > }); > > you get an object that has three properties, each with it’s own changeXxxx > event (ie changeText, changeCombo, changeSelect). Here’s a reworked > version of your code: http://tinyurl.com/m4cpatx > <http://tinyurl.com/m4cpatx> > > In your second post, you seem to be using underscore or something as well > as manually triggering the change events - that’s really not a good way to > do it, plus IMHO underscore is completely unnecessary to run parallel with > Qooxdoo. > > Two things that might help in the future are to provide examples in the > playground (see the above link) and to write in Javascript, not > typescript/coffeescript/etc - it’s much easier to understand and help > feedback examples if it can just be copy & pasted into the playground as a > working example > > John
/you get an object that has three properties, each with it’s own changeXxxx event (ie changeText, changeCombo, changeSelect). Here’s a reworked version of your code: http://tinyurl.com/m4cpatx <http://tinyurl.com/m4cpatx>/ Nice, thanks. /In your second post, you seem to be using underscore or something as well as manually triggering the change events - that’s really not a good way to do it, plus IMHO underscore is completely unnecessary to run parallel with Qooxdoo./ 1. Why is it completely unnecessary to use underscore? I use it a lot to get some functional programming done in javascript (p.s. javascript essentially is a functional programming language). I don't see any of the functionality offered by underscore in qooxdoo, so, why not use this lib? 2. Why is it not good to enable loose coupling using the message system instead of manually attaching event handlers? This is a well known pattern. For example, I can now have multiple objects subscribing to the same message, without those objects to require any direct knowledge of the sender. IMHO, this is, another, right way to do this. /Two things that might help in the future are to provide examples in the playground (see the above link) and to write in Javascript, not typescript/coffeescript/etc - it’s much easier to understand and help feedback examples if it can just be copy & pasted into the playground as a working example/ I think coffeescript is more readable, but that of course is quite personal. I will (and have) use the javascript versions in the future. Regards -- Casper -- View this message in context: http://qooxdoo.678.n2.nabble.com/How-to-listen-to-model-change-tp7586702p7586710.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel