I see. So events are dispatched in the direction parent -> child rather than beeing child -> parent. That seems pretty illogic and useless to be able to consume an event in that case. Usually you consume an event so it isn't passed from a child component to its parent because the child, which is closest to the screen (in z dimension), already has reacted to the user interaction... This is how every other Framework that I have tested and used so far works (they dispatch events from the innermost compenent in the component's hierarchy up to the root (=the last ancestor, that would be the Form in CN1)). So, in CN1, how do I prevent an event from beeing used by an interactive component when the interaction was supposed to be on one of its childs? (for example if I have a button B over a larger component P that can also react to clicks, how do I prevent P to react to a click that would happen in the zone of B ?)
On Thursday, September 20, 2018 at 9:01:49 AM UTC+2, Shai Almog wrote: > All events reach the form first. It dispatches them onward. > > > - Form callback methods (pointerPressed/Released etc.) > - Form listener methods > - Focused component (except for drag which is a bit of a special case) > > We don't send events to all the components in the hierarchy except for the > special case of drag where events are handled a bit differently. > -- 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/50d5924b-e455-4639-96e5-e8a02ecd0659%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
