Talk:developer.respondingToEvents

From autoplot.org

Jump to: navigation, search

rweigel:

Do event bubbling conventions apply?

http://en.wikipedia.org/wiki/DOM_events

http://www.quirksmode.org/js/events_order.html

jbfaden:

This discussion (events) was accidentally introduced to this bug, but anyway... I don't think it applies. The documents you point out is more about who gets an event, this is more about what should I do with an event when I am busy doing something else. das2 deals with this by handling stuff with the event thread, but the autoplot events are more abstract and I don't want to tie things to the GUI the same way. There are a few places where I need to deal with this, for example in https://sourceforge.net/tracker/?func=detail&atid=970682&aid=3036777&group_id=199733 where I need to get the TimeSeriesBrowse to not do the initial (URI) load but to wait for the axes to be set. I have about four or so places like this, where I can check if the DOM is locked and being adjusted by another, so I have to figure out what to do with the event. Normally I've been able to drop it because another event is guaranteed to come that will need the same sort of response (e.g. change axis log then change axis range then release lock). In this case I couldn't do that, so I need to clean up how I respond to things.

Note that even though a browser uses a DOM, they have similar (and more mature) code that implements this in the source for the browser. If it's done right, the user doesn't have to care...

Personal tools