Hi,
you said:
restrictive not to be able to refer to a superclass within a subclass -
that's enforcing an arbitrary design principle.
But that's not what you are doing: you are referring to a subclass within a
superclass.
And with this "So it seems pretty reasonable to me that all my objects kno
> Danny Kodicek wrote:
> > 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
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Hans Wichman
> Sent: 22 March 2007 12:39
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] Compiling with self-reference
> Importance: High
>
ailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 22 mars 2007 07:16
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] Compiling with self-reference
Slightly complicated and not terribly important but annoying:
It's possible for a class to compile while self-referring:
cl
Danny Kodicek wrote:
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) {
ps if you still need to do what you are trying, compiling twice or thrice
might help:)
On 3/22/07, Hans Wichman <[EMAIL PROTECTED]> wrote:
Hi,
this
class Clarss {
var pRoot:Clarss2
function Clarss() {
}
}
class Clarss2 extends Clarss {
function Clarss2() {
}
}
Hi,
this
class Clarss {
var pRoot:Clarss2
function Clarss() {
}
}
class Clarss2 extends Clarss {
function Clarss2() {
}
}
looks like a design error to me. One of the reasons you would use
inheritance is polymorphism, and reducing complexity. A super class having
to k
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;
8 matches
Mail list logo