To add to that, I suggested to Mattias using something like the
Observer pattern, but I find it difficult to see how we could trigger
the Notify event of the Subject (ancestor form), with so many places
that the ancestor form can be modified form. So this might not be a
solution, just though I would mention it anyway. Maybe it sparks some
other ideas. ;-)
Regards,
- Graeme -
On 02/10/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
Hi all,
I want to implement visual form inheritance, but there is one problem,
for which I don't see a good solution.
The situation: Both the ancestor and descendant forms are open in the
IDE.
The Problem: When the ancestor is edited, then the descendants need
to be updated.
The ancestor can be edited by:
Object Inspector: Here we can add detailed notifications if needed.
Designer: the same.
Anchor Editor: the same.
Some more tools: the same.
Component Editors: These can alter the component in various ways. They
only notify by an unspecific Modified event.
Experts: Same as Component Editors.
Descendants are loaded by applying first the ancestor values (.lfm) and
then the descendant overrides.
You can not clear/reset a component. You can only destroy it and create
it again.
To save the descendant values you need an ancestor instance to find the
differences/overrides and write them to the .lfm.
And last but not least:
Saving/Loading a component can take long, if it contains special data
like images and lists.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
--
There's no place like 127.0.0.1
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives