Persistence Post II

I had some feedback regarding the last post about “persist your forms”. Well, first of all: not the forms are persisted as streams. I picked certain components like edits and grids and selected certain properties which are being stored and restored in an ECO model. Thus, a user always has the same interface to work with. Data from edit boxes is being retrieved and the form position is being restored e.g. This draft version does not even have capabilities to exclude certain components. It always iterates all the components on the form and if it finds a component it “knows” the properties I selected are being persisted or restored.

Secondly, Olaf Monien asked me if I could deliver a version without somebody having to set up an ECO Space etc. I built it. The component looks like this in the Object Inspector now:

As you can see, there is a Filename property. You can define a file to persist your data to. Leave the RootHandle empty and the component loads its own ECO Space and all the necessary components. You simpy have to specify the filename for the xml data. Everything else is being done by the component. This gives you less flexibility, but also makes ECO completely “unnecessary” to include. You can create a standard VCL.NET project and drop the component on a form. You still will be able to use all the great features described previously. And the best thing: if you decide to use more ECO functionality later, you can hook up the component to that as well.