Slightly complicated and not terribly important but annoying:
It's possible for a class to compile while self-referring:
class Clarss {
var pParent:Clarss;
function Clarss(tParent:Clarss) {
if (tParent != undefined) {
pParent = tParent;
}
}
}
This compiles fine. But with inheritance this no longer works:
class Clarss {
var pRoot:Clarss2
function Clarss() {
}
}
class Clarss2 extends Clarss {
function Clarss2() {
}
}
Now the compiler gets confused by the circular reference and tells me
"**Error** C:\...Clarss.as: Line 1: The name of this class, 'Clarss',
conflicts with the name of another class that was loaded, 'Clarss'."
It's a shame: My object structure has a bunch of objects in a tree
structure, all of which inherit the same base class. I'd like them all to
have a reference to the top-level node object, but I have to refer to it as
an Object instead of its actual class name because otherwise it can't
compile.
Danny
_______________________________________________
[email protected]
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