Recently I noticed that there're methods on Flex classes that can be called
upon that are NOT declared nor implemented either directly by a Flex class
or indirectly by any of its parent classes.

For example, I wrote a test class called Test.as as shown below that has no
method in it and doesn't have any parent class. As soon as I make my test
class bindable and also at the same time implement
"com.adobe.cairngorm.vo.IValueObject", which is a marker interface, I
suddenly can call any of the methods declared by IEventDispatch interface,
e.g. addEventListener", on my own test class, although it doesn't have those
methods in it.

package test
{
  import com.adobe.cairngorm.vo.IValueObject;

  [Bindable]
  public class Test implements IValueObject
  {
    public function Test()
    {
        addEventListener("test"), null);
    }
  }
}

I wonder how Flex does this trick.



--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/Who-magically-added-that-method-tp7643.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to