On 02/10/06, Marc Weustink <[EMAIL PROTECTED]> wrote:
The observer pattern will work here. Every descendant "subscribes"
itself to a change notification. IIRC, the ancestor knows when something
is changed (you need this enyway to reflect changes in the desinger). So
when changes the ancestor notifies its observers, which reload them selves.
That the ancestor can be edited in severla ways, doesn't matter in this
case.
Marc
Ok, and any idea how we can optomize the "subscribers" Update method,
so they can know what changed. Normally the "subject" calls the
Update method of all it's "subscribers" passing itself as a parameter.
Maybe we could pass a second parameter (data object - maybe a list of
some sorts) containing the names of the components that changed. Even
a TStringList might do. Just another thought.
Regards,
- Graeme -
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives