Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Josh Tynjala
This type of issue used to get me all the time with the classic Flex SDK. I'd have some subclass of Panel or something, but I'd have some kind of selectedItem property on it that dispatched Event.CHANGE. If I had a child that was a Slider or something, the slider's Event.CHANGE would bubble, and I'

Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Harbs
Yes. That seems to be the case: https://github.com/google/closure-library/blob/608e0eaaa42bb5f041a7f067f254907d47edf7d1/closure/goog/events/eventtarget.js#L371 > On J

Re: [FlexJS] String.match()

2017-07-21 Thread Harbs
lists.apache.org displays it fine: https://lists.apache.org/thread.html/ec0b951752140ad0cd56319b9629cc4a7e097487fd47c84649ffc352@%3Cdev.flex.apache.org%3E

Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Alex Harui
I think we can use setParentTarget to get bubbling to work reliably with custom events, but as Peter said, I don't think we want to set up parentTarget's just-in-case. Bubbling custom events is not a recommended practice as was mentioned in some other thread recently. Imagine if you had a Panel a

Re: [FlexJS] stopImmediatePropagation

2017-07-21 Thread Alex Harui
I think other goog code updates currentTarget as needed. They are the same when no capture or bubbling, IIRC. -Alex On 7/20/17, 11:52 PM, "Harbs" wrote: >Yes. I need to copy the code from BrowserEvent. > >Interestingly, goog.Events does not distinguish between target and >currentTarget. That d

Re: [FlexJS] String.match()

2017-07-21 Thread Alex Harui
My email totally mangled your post. Anyway, if you think you've got code that is equivalent to Flash's String.match, that's good enough for now. If folks find issues later we can improve on the utility function. If you want to alter the compiler output, see how I handled Array.sortOn in Function

Re: [FlexJS] findPopupHost issue

2017-07-21 Thread Peter Ent
I needed events to bubble for the drag and drop work. While that was fine for the Flash Player, the FlexJS/Google/Browser event mix didn't work. Alex suggested I used setParentTarget on the event to work up the tree and then the event would be dispatched at each level, thus mimicking bubbling. I di