On 9/5/16, 8:35 AM, "yishayw" <yishayj...@hotmail.com> wrote:

>I tried adding
>
>                               (c as 
> ElementWrapper).setParentEventTarget(this);

I think it would be:

        (c as ElementWrapper).setParentEventTarget(this.parent)

Still, though, we should also change Panel to use best practices and not
bubble the event.  IMO, bubbling is only for interactive events.  When you
bubble an event, the event type/name becomes global.  That can pose a big
problem for mashups and other aggregations.  PanelView should listen to
TitleBar (to be PAYG, PanelViewForTitleBarWithCloseButton should listen to
TitleBarWithCloseButton), and dispatch the "close" event from the Panel.
No need for the parents of Panel to have to think about a "close" event.

-Alex

>
>in UIBase.addChild() but that crashed my test app with an endless
>recursion. 
>
>For future reference, I think the problem is that in this piece of code:
>
>goog.events.EventTarget.prototype.dispatchEvent = function(e) {
>  this.assertInitialized_();
>
>  var ancestorsTree, ancestor = this.getParentEventTarget();
>  if (ancestor) {
>
>ancestor is undefined.
>
>I'll see if I can easily fix the Panel 'close' event relying on bubbling
>from the title bar.
>
>
>
>--
>View this message in context:
>http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Bubbling-Probl
>em-tp54796p54823.html
>Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to