You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2018/11/09 18:22:51 UTC

[GitHub] aharui commented on issue #340: URLLoader: HTTPStatusEvent addition

aharui commented on issue #340: URLLoader: HTTPStatusEvent addition
URL: https://github.com/apache/royale-asjs/pull/340#issuecomment-437449533
 
 
   I'm accepting this change, but I want to bring up a pattern change between Flex and Royale.  IMO, the PAYG Royale components should have as few Event subclasses as possible.  Each new class definition adds to the amount of code that needs to be downloaded and parsed at startup.  So, if you look at how Royale currently handles Timer, there is no TimerEvent, it just sends an Event.  The constant that represents the name/type string of the Event is defined in the Timer class itself because you are already paying for that class definition.  Ideally, Royale would have Event and ValueEvent (which allows an Event to have a payload of one data item, and code needing to dispatch events would just dispatch those events and not subclasses of those events.  There is a ValueChangeEvent that has two fields (before and after values).  There could be one where the value is known to be a String if that's helpful.  Unless you actually have code in the listener to check the type, in JS, the type will not actually be checked (it is checked by the verifier in Flash, though), so what type is actually sent generally won't matter and it is much faster to check the name/type string than run Language.is to check the class type.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services