Its been around for a while, and in fact works for Delphi, Java and I think
C++ - might also work for VB. In any case, what you can also do is the
forward declare the class - useful when you have inter-dependencies:
type
TClass1 = class;
TClass2 = class;
TClass1 = class (TObject)
private
FClass2: TClass2;
end;
TClass2 = class (TObject)
private
FClass1: TClass1;
end;
Regards,
Dennis.
----- Original Message -----
From: "gajo" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]>
Sent: Monday, December 22, 2003 9:10 AM
Subject: Re: [DUG] Error with pointers
> > So to summarise, what you should have done is:
> >
> > type
> > TMain = class
> > private
> > connect: array[1..maxNum] of TMain;
> > ...
> > end;
> > Hope this helps.
>
> Sure does, thanks! :)
> I didn't know I can use properties of the same type as the object before
> that object is defined. I wrote this program in Java and there I did just
> what you said, because I knew I could do this.
>
> Is this a new feature or something that has "been around for a while"?
>
> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
>
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi