If I use metadata tags in front of an interface, is that the same as in front of a class? I. e., can I do
[Event(name="fooUpdate", type="com.acme.events.FooEvent")
public interface IFoozer extends IEventDispatcher
{
}
// ... now omit that metadata in the implementations ...
public class Foozer extends EventDispatcher implements IFoozer
{
public function set bar(b:Bar):void
{
this.dispatchEvent(new FooEvent(FooEvent.FOO_UPDATE));
}
}
// ... and expect it to be known in MXML ...
<acme:Foozer fooUpdate="myUpdateHandler">
<!-- ... -->
</acme:Foozer>
Or, similarly, with [Bindable]?
You can define
[Event]metadata in interfaces for informational purposes, but unlike functions, you cannot enforce that implementations use those events. In my experience, you must re-define the events in the implementation classes.