Re: [FlexJS] Events redux

2017-03-06 Thread Harbs
> On Mar 6, 2017, at 6:24 PM, Alex Harui wrote: > > > > On 3/6/17, 8:05 AM, "Harbs" wrote: > >> Actually, it looks like it’s only implemented to make the compiler happy. > > Hmm. In my copy of EventDispatcher.as, hasEventListener calls > goog.events.hasListener. The SWF side picks it up f

Re: [FlexJS] Events redux

2017-03-06 Thread Harbs
MockLayoutChild had an error. When I fixed that, everything seems to compile. I’ll commit the change… > On Mar 6, 2017, at 5:51 PM, Alex Harui wrote: > > hasEventListener has been implemented. I didn't notice until now that it > is commented out of IEventDispatcher for JS. Don't know why that

Re: [FlexJS] Events redux

2017-03-06 Thread Alex Harui
On 3/6/17, 8:05 AM, "Harbs" wrote: >Actually, it looks like it’s only implemented to make the compiler happy. Hmm. In my copy of EventDispatcher.as, hasEventListener calls goog.events.hasListener. The SWF side picks it up from flash.events.EventDispatcher. With this and the problem with int

Re: [FlexJS] Events redux

2017-03-06 Thread Harbs
Actually, it looks like it’s only implemented to make the compiler happy. I’d be interested in trying out dual. How could it work on the swf side if willTrigger is not implemented? And how does it work when the JS side and swf side have different signatures (i.e. flash Event vs. Object)? > On M

Re: [FlexJS] Events redux

2017-03-06 Thread Alex Harui
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 wrote: >> >> I’m again struggling with the fact that

[FlexJS] Events redux

2017-03-06 Thread Harbs
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

Re: [FlexJS] Events redux

2017-03-06 Thread Harbs
t; On Mar 6, 2017, at 4:53 PM, Harbs 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,

Re: [FlexJS]Events

2016-07-03 Thread Alex Harui
On 7/3/16, 10:56 PM, "Harbs" wrote: >Yes. We’re using XHR. I don’t understand the advantage of using >HTMLElementWrapper. I think all we need is a simple event dispatcher >which extending the Flex EventDispatcher seems to do. It's been a long time, so I don't have the reasons in my head, but I

Re: [FlexJS]Events

2016-07-03 Thread Harbs
Yes. We’re using XHR. I don’t understand the advantage of using HTMLElementWrapper. I think all we need is a simple event dispatcher which extending the Flex EventDispatcher seems to do. As far as the events go, we’re handling the XHR events within the class and dispatching separate generic eve

Re: [FlexJS]Events

2016-07-03 Thread Alex Harui
Are you going to use XHR on the JS-side? HTMLElementWrapper has a good place to create the XHR and hooked some things in the JS event dispatching that you might also need. We also have a BinaryUploader that might be a good starting point. HTH, -Alex On 7/3/16, 10:02 PM, "Harbs" wrote: >For me

Re: [FlexJS]Events

2016-07-03 Thread Harbs
For me the important piece is fetching and sending binary data and HTTP codes. (I have a wrapper around it to handle errors, error codes, multipart uploads, etc.) I have not studied the new HTTPService class very well, but the original version was very rigid about the type of data it got. On J

Re: [FlexJS]Events

2016-07-03 Thread Alex Harui
What does URLLoader do that HTTPService doesn't? -Alex On 7/3/16, 9:36 AM, "Harbs" wrote: >Let me explain a bit better why I’m asking. > >Yishay and I are working on a URLLoader class which will behave similar >to the Flash URLLoader class. Is there any reason not to make both the >Flash and JS

Re: [FlexJS]Events

2016-07-03 Thread Harbs
Let me explain a bit better why I’m asking. Yishay and I are working on a URLLoader class which will behave similar to the Flash URLLoader class. Is there any reason not to make both the Flash and JS version extend EventDispatcher? From what I can see, the flex EventDispatcher on the JS side ex

Re: [FlexJS]Events

2016-07-03 Thread Alex Harui
On 7/3/16, 7:21 AM, "Harbs" wrote: >The first “flex” was a typo and it should have been “flash”. I'm not seeing that in the code. Can you be more specific about which lines are doing this? > >I’m not sure my question made sense, but I do have a related question: >Why this? >COMPILE::SWF

Re: [FlexJS]Events

2016-07-03 Thread Harbs
The first “flex” was a typo and it should have been “flash”. I’m not sure my question made sense, but I do have a related question: Why this? COMPILE::SWF public class HTTPServiceBase extends EventDispatcher { } COMPILE::JS public class HTTPServiceBase extends HTML

Re: [FlexJS]Events

2016-07-03 Thread Alex Harui
On 7/3/16, 1:52 AM, "Harbs" wrote: >I’m struggling to understand events in FlexJS. It looks like events are >conditionally handled to be either “flex” events on the swf side of >“flex” events on the JS side. Specifically, I’m looking at HTTPService. >Why does it not use flex events for everythi

[FlexJS]Events

2016-07-03 Thread Harbs
I’m struggling to understand events in FlexJS. It looks like events are conditionally handled to be either “flex” events on the swf side of “flex” events on the JS side. Specifically, I’m looking at HTTPService. Why does it not use flex events for everything? Thanks, Harbs