Nice hack if you aks me. Thanks. Based on this hack I can be sure it's
not supported. Sadly enough.
Oh well, thanks for sharing the hack.
Yours,
Weyert
Hello :)
Try this method :
package
{
import flash.utils.getQualifiedClassName;
import flash.errors.IllegalOperationError;
class AbstractClass
{
public function AbstractClass ()
{
var path:String = getQualifiedClassName(this) ;
if( path == "AbstractClass")
{
throw new IllegalOperationError("AbstractClass is abstract,
you
can't instanciate it directly.");
}
trace("in A constructor : "+ path);
}
}
class MyClass extends AbstractClass {
public function MyClass() {
super() ;
}
}
class MainClass {
public function MainClass() {
var i:MyClass = new MyClass() ; // ok
var a:AbstractClass = new AbstractClass() ; // throw
IllegalOperationError
}
}
}
EKA+ :)
2006/7/9, Weyert de Boer <[EMAIL PROTECTED]>:
I am blind or is their no support for Abstract classes in AS3?
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com