DModel question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

DModel question

Salvatore Salpietro

In Model.js of dmodel, why does observe not  return a new reactive object when onlyFutureUpdates is set to true?


Also can you explain the differences between dmodel way to observe a property and Stateful way? why was this method to observe a property made to function differently than the way you do it in Stateful.  Personally I like the way it is done in Stateful where the callback function can provide all three parameters, name of property, new value, and old value all at the same time, whereas the dmodel way calls the callback function twice, once with the update value and once with the current value. 


              observe: function (/*string*/ key, /*function*/ listener, /*object*/ options) {

                     //     summary:

                     //            Registers a listener for any changes in the specified property

                     //     key:

                     //            The name of the property to listen to

                     //     listener:

                     //            Function to be called for each change

                     //     options.onlyFutureUpdates

                     //            If this is true, it won't call the listener for the current value,

                     //            just future updates. If this is true, it also won't return

                     //            a new reactive object

                     return, options);






This communication including any information transmitted with it is intended only for the use of the addressees and is confidential. If you are not an intended recipient or responsible for delivering the message to an intended recipient, any review, disclosure, conversion to hard copy, dissemination, reproduction or other use of any part of this communication is strictly prohibited, as is the taking or omitting of any action in reliance upon this communication. If you receive this communication in error or without authorization please notify us immediately by return e-mail or otherwise and permanently delete the entire communication from any computer, disk drive, or other storage medium.
Dojo Toolkit:

[hidden email]
To unsubscribe, visit: