Re: [Flashcoders] Compiling with self-reference

2007-03-23 Thread Hans Wichman
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

RE: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Danny Kodicek
> 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

RE: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Danny Kodicek
> -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 >

RE: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Alain Rousseau
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

Re: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Ron Wheeler
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) {

Re: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Hans Wichman
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() { } }

Re: [Flashcoders] Compiling with self-reference

2007-03-22 Thread Hans Wichman
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

[Flashcoders] Compiling with self-reference

2007-03-22 Thread Danny Kodicek
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;