No. All lightweight frameworks start from the root frame or parent.

This is the most efficient and most sensible way to do this in a 
lightweight framework. You might be thinking of a heavyweight framework 
where the components are outside of the control of the framework and thus 
they are responsible for handling their own events. But if you look at the 
OS implementation and other lightweight frameworks you'll see that our 
implementation is how things actually work because it's the one that makes 
sense.

Here's why:

- You have one point where you can override the pointer behavior for 
everyone - the form this is very useful
- You don't pay the cost of going through all the components to process the 
event logic if you do this

Notice that the OS doesn't know about our components it just sends a 
pointer event. "Someone" needs to find the component to process, that code 
is in Form. If you override pointer handling there you effectively save us 
the cost of walking the component hierarchy to find the right child for the 
event at the given location.

This is a far more powerful and consistent approach, one of the problems 
with heavyweight frameworks is the inconsistent event dispatch behavior 
which they try to normalize from the component level.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/264efe38-d6e9-4c15-b005-ec394516beca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to