On Mon, 12 Jan 2009 10:57:20 +0000 Martin Friebe <[email protected]> wrote:
>[...] > Thanks, I think I found a better way. > > The outer container has no nested components of it's own. It seems I > can hook into (override) TComponent.WriteState which is calling > WriteComponentData (properties, then Children). Since no children are > there, I can make my own calls to WriteComponent from there, > supplying all the components, of all the helper objects. > > On Read, I can Hook into ReadState. I can let the reader add them > normally, and sort them out/once they have been read by the reader. > > The remaining question is: Does that look like something that will > stay compatible with future code? The generated LFM file definitely > looks like any LFM file (it has a component, with properties first > then other nested Components) To store a property that is a component and which is not owned by the Lookuproot (form, datamodule, frame) you must set the csSubComponent flag in ComponentStyle. To store a list use TCollection. If you can not use TCollection please explain why not. To store data of arbitrary length/format, use DefineProperties. This has a drawback: In case of an error the IDE can not help fixing it. Mattias _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
