Has anyone had to save the insance of a class which had a properties which
were pointers? I have a really simple class. Just a few functions and a
couple properties & variables. But now I need to be able to save the class
to a file. Of course when you re-open the file the pointers will be
useless.
I was thinking and the only way I came up with storing this to file would be
to get the Name of the TTabSheets and the Text of the Node. That way when I
read it back in I just have to search for those names in the PageControl and
Tree by looping through and set those. Although this would probably work
it's probably not the best way to do it right?
TPage = class
private
pge: TTabSheet;
par: TTabSheet;
txt: String;
show: Boolean;
node: TTreeNode;
function GetTab: TTabSheet;
procedure SetTab(Tab: TTabSheet);
function GetText: String;
procedure SetText(text: String);
public
Constructor Create; overload;
Constructor Create(pg: TTabSheet; text: String; pare: TTabSheet = nil;
showProp: boolean = true); overload;
property page: TTabSheet read GetTab write SetTab;
property text: String read GetText write SetText;
end;
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php