Event Handling
Comments
Yes, the listeners are created with useWeakReference set to true.
Did the EventHandler metatag get switched out for Mediate? Just curious because this example doesn't use EventHandler at all, but this page shows to use this.
Mediate will still work, but has been deprecated in favor of EventHandler. That change was made after RC2 but will be part of the final 1.0 release.
[EventHandler( event="UserEvent.ADD_USER", properties="user" )]
public function addUser( user:User ):void
if the properties more than one
the tag event [EventHandler] how to write,such as " public function addUser( user:User,sex:String ):void"
Not sure if you didn't read the above section on the properties attribute, or if you somehow missed it, but it clearly says to use a comma-delimited list of property names. So you want: [EventHandler( event="UserEvent.ADD_USER", properties="user,sex" )]
Hi, I did notice when using Protoype Beans with Mediate metatags these will not be garbage collected after removing a bean instance. Are event listeners that Mediate creates using weak references?