Hopefully, I'll get the dual branch operational today and we can check out this scenario on that branch. It should alleviate a lot of the issue.
hasEventListener has been implemented. I didn't notice until now that it is commented out of IEventDispatcher for JS. Don't know why that his, but feel free to uncomment it and see what happens. WillTrigger might be trickier. Is it used a lot? -Alex On 3/6/17, 7:03 AM, "Harbs" <harbs.li...@gmail.com> wrote: >> As I’m writing this I’m realizing that I can probably not make these >>classes implement IEventDispatcher. I’ll see how that goes… > >Bah. It creates an EventDispatcher from new EventDispatcher(this). It >also uses hasEventListener and willTrigger which FlexJS both do not >support… :-( > > >> On Mar 6, 2017, at 4:53 PM, Harbs <harbs.li...@gmail.com> wrote: >> >> I’m again struggling with the fact that FlexJS events have weird >>inheritance. >> >> I’m working on a TLF port to FlexJS (and no, I have no idea when I’ll >>be able to donate the results. I hope to be able to donate it in some >>form, but I don’t know when I’ll be in a position to do that.) Either >>way, TLF has quite a bit of event redirection and it implements a number >>of classes which implement IEventDispatcher, but are not >>EventDispatchers themselves. dispatchEvent proxies the event to a “real” >>event dispatcher. >> >> When I try to compile the code, I get the following error: >> >> [compc] >>/Users/harbs/Documents/git/PrintUI/printui-flexjs/text_engine/frameworks/ >>tlf/src/org/apache/flex/textLayout/elements/LinkElement.as(205): col: 19 >>Error: interface method dispatchEvent in interface IEventDispatcher is >>implemented with an incompatible signature in class LinkElement >> [compc] >> [compc] public function dispatchEvent(evt:Event):Boolean >> [compc] ^ >> [compc] >> [compc] >>/Users/harbs/Documents/git/PrintUI/printui-flexjs/text_engine/frameworks/ >>tlf/src/org/apache/flex/textLayout/elements/TextFlow.as(880): col: 19 >>Error: interface method dispatchEvent in interface IEventDispatcher is >>implemented with an incompatible signature in class TextFlow >> [compc] >> [compc] public function dispatchEvent(event:Event):Boolean >> >> which I guess makes sense because it’s trying to dispatch a Flex event >>instead of a Flash one. I really wish Flex events were “clean” without >>the baggage of being subclassed from platform specific dispatchers… :-( >> >> As I’m writing this I’m realizing that I can probably not make these >>classes implement IEventDispatcher. I’ll see how that goes… >> >> Harbs >