Re: [Flashcoders] Accessing non-interface methods from an object of an interface type

2006-06-14 Thread Hans Wichman
The compiler sees an object of type Interface which does not support the method you are trying to call. Either use: var tmp:ConcreteClass = new ConcreteClass(); or var tmp:Interface = new ConcreteClass(); ConcreteClass(tmp).bar(); grtz JC On 6/14/06, Mark Lapasa <[EMAIL PROTECTED]> wrote: //

Re: [Flashcoders] Accessing non-interface methods from an object of an interface type

2006-06-14 Thread eka
Hello :) you must use "Transtype" if you use a method defined in your class but not in the interface :) [code] import ConcreteClass; import Interface; var tmp:Interface = new ConcreteClass(); tmp.foo(); // Works ConcreteClass(tmp).bar(); // Works with methods not implemented in interface. [

[Flashcoders] Accessing non-interface methods from an object of an interface type

2006-06-14 Thread Mark Lapasa
/// // Inside "Interface.as" // /// interface Interface { public function foo():Void; } /// // Inside "ConcreteClass.as" // /// import Interface; class ConcreteClass implements Interf