| Subject: | Problems with Inherited TObjectList Class |
| Posted by: | Loki Man (lokim…@hoknows.com) |
| Date: | Fri, 31 Oct 2008 |
Hi guys I've writed an class that inherits from TObjectList, but I dont
know why its giving me some invalid pointer address when the parent
class destructor calls FreeAndNil(TheListInstance). I was debuggin and
I think the error is getin when I use the assign method from
TObjectList ...
My current classes is something like that
TUser = class(TPersistent)
-------------
constructor Create; //Just do FUserRights := TUserRights.Create;
destructor Destroy; override; //FreeAndNil(FUserRights)
procedure Assign(aUser: TPersistent); //Just assign the things
property UserRights: TUserRights read FUserRights write FUserRights;
TUserRights = class(TObjectList)
//Just casts the functions and properties to the TUserRight type.
If I dont call the assign the error doesnt appear, but I need to use
the assign on the TUserRights ... Any Tips ?
Regards,
Loki.