On 2007-07-12, at 07:58 EDT, Robin Sheat wrote:

Maybe a better thing would be to create your own flag to silence the
handlers and set that flag to true when you get the oninit event?
That was my initial solution, however I found an instance where that doesn't work. If your views are being replicated, you have an initial instance before the data comes through (the data coming from the server, so well after the application has started). That instance has it's oninit method called, and then some time later the data is bound. Hmm, does ondata fire before or after the attributes are bound? If after, that would be the solution. (my wish is for finer-grained events for things like this. I'd love to have an event that says something like 'you are about to be deleted because your datapath node has gone', currently I'm manually doing that so I can register the deletion
on the server).

The sequence is:

node's data is set to the matching datapointer
ondata is sent
applyData is called.

(I'm not sure why applyData is there. It would seem to me that if you wanted to massage the data, you would just write a setter method for data.)

Reply via email to