tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/144-actor-not-forwarding-eventsRobotlegs: Discussion 2018-10-18T16:35:15Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/25018002010-08-07T11:55:38Z2010-08-07T11:55:42ZActor not forwarding events<div><p>That's a flash player issue, not RL. From the AS3 help files:<br />
</p>
<blockquote><p>When creating your own custom Event class, you must override the inherited Event.clone() method in order for it to duplicate the properties of your custom class. If you do not set all the properties that you add in your event subclass, those properties will not have the correct values when listeners handle the redispatched event.</p></blockquote>
<p>Obviously this applies to the <code>type</code> property as well, therefore it fails silently; the event is redispatched, but the type property is empty.<br />
You should make it a custom to ALWAYS override the clone method of Event subclasses.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/25018002010-08-07T12:24:01Z2010-08-07T12:24:02ZActor not forwarding events<div><p>true, but if you try to re-dispatch a custom Event object, doesn't it usually throw an Error if you haven't override the clone method?</p></div>jamesrtag:robotlegs.tenderapp.com,2009-10-18:Comment/25018002010-08-07T13:26:01Z2010-08-07T13:26:01ZActor not forwarding events<div><p>sorry, i realise i'm talking rubbish. The error's thrown when a handler that's expecting a certain event type receives an Event instead. This obviously wouldn't happen in RL as the the Event type is also checked.</p></div>jamesr