Looking at the DOM 2 Events spec (http://tinyurl.com/e2twx), here's the relevant paragraph on event targeting:

Each event has an EventTarget toward which the event is directed by the DOM implementation. This EventTarget is specified in the Event's target attribute. When the event reaches the target, any event listeners registered on the EventTarget are triggered. [...] If neither event capture or event bubbling are in use for that particular event, the event flow process will complete after all listeners have been triggered. If event capture or event bubbling is in use, the event flow will be modified as described in the sections below.

So it is up to the DOM implementation to determine the initial EventTarget. In the browser case, clearly the initial EventTarget is taken as the frontmost view whether or not a relevant event handler is installed on that view. (This behavior is consistent with every desktop GUI framework I've ever seen.) The rest of the behavior we see follows: capture and bubbling only apply to the EventTarget's parent chain up to the Document so you'll never see targeting of views that are visually behind the EventTarget but are not an ancestor of that target.

So we've got two realistic choices: adopt the DOM2 targeting model in Flash, or adopt the Flash model in all other runtimes. Based on principles alone I would favor the former, but I admit I don't know what impact this would have on existing OL applications.

There is a way of adopting the Flash model that we haven't yet pursued (I don't think) -- using the event capture phase to essentially re-implement targeting. So we force event capture, and from the document down redirect the event where we want it. But we'd still need a quadtree or something to know where to redirect the event. 

However, this imposes overhead on all DOM2 runtimes (HTML, SVG, ...) in order to support what will over time increasingly appear to be an oddball behavior inherited from Flash.

I guess the first question is what the impact of adopting DOM2 event targeting would be on existing code. Anyone want to investigate this?

jim

On Sep 13, 2006, at 9:25 AM, Jim Grandy wrote:

Moving thread to laszlo-dev.

On Sep 13, 2006, at 7:35 AM, Henry Minsky wrote:

Being naturally lazy and simple-minded I've thrown this out before as an idea, what if we say that LZX uses the DHTML model of
click-handling, and modify SWF to act the same way (i.e., all views clickable).  Not being a GUI designer, I don't really know what the pluses and minuses are, but it seems to me like if the app designer is going to put graphics on top of
clickable views which are in a different parent hierarchy, then maybe it is incumbent upon them to explicitly forward
the mouse events to the area they are covering up?



On 9/13/06, P T Withington <[EMAIL PROTECTED]> wrote:
I guess this is no worse than the SWF case where we have to have two
movie clips for every view?  Still sucks though.

On 2006-09-13, at 02:36 EDT, Max Carlson wrote:

> It turns out any view physically on top of a clickable view (but not a
> child) intercepts all mouse events.  We originally thought this was
> restricted to text views
> (http://jira.openlaszlo.org/jira/browse/LPP-2520 ) but it applies to
> any
> view.  I'm making this my top priority.  I filed a new bug to track
> this:
> http://jira.openlaszlo.org/jira/browse/LPP-2680
>
> I'm glad I left the fix in!
>
> -Max
>
> _______________________________________
>
> Internal-Dev mailing list
> [EMAIL PROTECTED]
> https://hedwig.laszlosystems.com/mailman/listinfo/internal-dev
>
> To search the dev list: http://lists.laszlosystems.com/intranet/
> finddev.cgi


_______________________________________

Internal-Dev mailing list
[EMAIL PROTECTED]
https://hedwig.laszlosystems.com/mailman/listinfo/internal-dev

To search the dev list: http://lists.laszlosystems.com/intranet/finddev.cgi



--
Henry Minsky
Software Architect
[EMAIL PROTECTED]


_______________________________________

Internal-Dev mailing list



_______________________________________________
Laszlo-dev mailing list

_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to