Listen... I have scoured the web for code that generically streams a TPersistent and its properties (and its children). There are hundreds of requests for them out there.. but the only ones that exist are either no longer supported or available (eg. spiderclasses) or talked about as proprietary solutions by braggarts -- and not available. Delphi loves to say that a Tpersistent supplies all that is required for streaming.. but it's a lie. Only a TComponent can stream its children directly without an incredible amount of effort.
I have written a simple component "carrier" that will stream a Tcollection and its Tpersistent collection items... but failed miserably at creating a generic Tpersistent that streams its own properties (to a stream.. not a DFM file). I get all flumoxed at the define properties area and just have no more time to try. But I know this is relatively trivial exercise for you gurus out there. So why not take a few hours and write one for the good of mankind--or at least Delphi users everywhere? The karma will come back to you!
I'm blowing 20 whole points to make this public plea. Don
t let them be spent in vain :)
There is a pretty good starting point out there called "TOList" (Search web for it). It will work for a list of Tpersists... and could probably be used as a model, but I failed (ran out of time) at adapting it to a generic class. Yes, I coud save properties of the Tpersistent.. but not sub object properties of it (such as stringlists, etc.).
INcidently.. I am a D5 user. IF D6/7 already does this, I will kill myself by swallowing a repeat statement consisting of nothing but...
x:= X + 1