I made a post to the adobe AS3.0 forum regarding the following problem which 
came up 
using the Flex compiler. Please view the full post for more details.

"Event bubbling causes a compiler error when it should not."

- High up in the display list, a listener has been added for TypeBEvent which 
extends 
TypeAEvent.

- Lower in the display list, a different object dispatches a TypeAEvent, and 
sets bubbling 
to true (and possibly, cancellable to false).

- A Type Coercion error (#1034) results! The listener receives the bubbled 
event which is 
of the same type as the base class of the handler event type. The event object 
"cannot be 
converted" to the TypeBEvent it is receiving.


"...the player breaks and does not provide any clue as to where, it only 
indicates the 
dispatching class as a culprit. Even short of fixing the problem, improving the 
error 
message so that the receiving event handler is clearly implicated would be a 
start.

"Again I am of the opinion that this compiler error should not take place at 
all because the 
top class subscribed specifically to the subclassed event type."


Full post:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?
forumid=60&catid=587&threadid=1271034&enterthread=y

Reply via email to