Hi Dennis
I knew string variables were internally just stored as a memory location, well as with every variable really, but I didn't realise how Delphi handled copies of strings with reference counters, and returned string values from functions etc. So definitely learned something there. Thanks for the help. I don't plan on hacking any other private members of a class but now that I knno it works, it may one day come in handy.
Cheers, Ross.
----- Original Message ----- From: "Dennis Chuah" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]>
Sent: Monday, September 20, 2004 7:01 AM
Subject: Re: [DUG] TStringList.FList
Ross,
Well, I hope you've learn a few things and had a bit of fun with this foray
into TStringList and it hasn't been a complete waste of time for you. The
point I was trying to make from my first email, but perhaps haven't been
emphasised enough, is hacking the private members of a class should only be
the very last resort. I have been programming commercially for over 12
years, and in that time, only had to hack private members twice, once in
Delphi (which Borland subsequently made public) and another time in C++.
Regards, Dennis.
----- Original Message ----- From: "Ross Levis" <[EMAIL PROTECTED]>
I've worked out that what you and I mentioned is the case. I don't needtheFList exposed now. I get the same memory location of the string using theThat
standard Strings[index] method. I didn't realise it worked that way.makes things much simpler._______________________________________________ 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
