Aww fuck!  I clicked the wrong newsgroup.  Sorry about that guys.

"Stut" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Dan wrote:
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;

That looks a lot like Delphi not PHP. I'm assuming that means you're using that freaky Delphi for PHP thing in which case you'll have better luck on their mailing list(s).

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to