nirth
05-26-2006, 04:20 AM
Hello conf, i'm currently working on problem with implementing interfaces in mxml, i found some workaround:
some interface:
package{
interface A {
function doSomething():void;
}
}
class which implement interface, and used as base class for mxml
package{
public class B extends VBox implements A {
public function doSomething():void {};
}
}
and finally our mxml
<?xml version="1.0" encoding="utf-8"?>
<B xmlns:mx="http://www.adobe.com/2006/mxml">
<!-- some stuff goes here -->
</B>
but i dont really like this way, is there any way to implement interface directly?
some interface:
package{
interface A {
function doSomething():void;
}
}
class which implement interface, and used as base class for mxml
package{
public class B extends VBox implements A {
public function doSomething():void {};
}
}
and finally our mxml
<?xml version="1.0" encoding="utf-8"?>
<B xmlns:mx="http://www.adobe.com/2006/mxml">
<!-- some stuff goes here -->
</B>
but i dont really like this way, is there any way to implement interface directly?