Neven wrote:
>
> > Going straight from TDataset to TCollection with property 'inspection'
> (i.e.
> > having it examine the RTTI property information) to automatically create
> > TFields that map straight through to the underlying collection entities
> > makes it really painless to just point a grid at a collection as a quick
> > component editor (or whatever) UI without much thought and
> without having
> to
> > write all the boilerplate code and update it as you change your
> component's
> > properties or structure.
>
> This is pretty much what I had in mind
>
> var
> C: TCollection;
> CD: TCollectDataSet;
>
> ....
> CD.Collection := C;
>
> edt away..
Yes. That's pretty much the the way we do it.
>
> > A little work to write in the first place, but much higher re-use 'bang
> for
> > your buck' afterwards.
> >
> > Mind you, we've written lots of TDatasets to different styles of data
> > 'source' (memory, SQL, ISAM db, Collection, Interface-based) so I guess
> > we've gotten used to whipping them up.
> >
>
> Are you offering?
To sell it as a component? No.
We've been down that track before with component's we've built (NL Fields
Editor) and not found it worth our while spending resources doing given the
returns.
The TnCollectionTable is at the end of a fairly deep inheritance hierachy
which contains all the base classes we've built over the past few years
based on the various levels of TDataset and TTable functionality we've
needed. TDataset itself is actually pretty 'dumb' - no Filters, Indexes,
SetRanges, Locates, etc.
'Divorcing' TnCollectionTable away from all that code so that it stands
alone would likely be a bigger job than writing it was in the first place
since Max was able to re-use all the TDataset infrastructure once he
realised what a 'cool idea' a TnCollectionTable was.
If you plan to write a reasonable number of TCollection components which
need property editors, I'd wager it would be worth the investment to build a
TCollectionDataset of your own.
TTFN,
Paul.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz