Mattias Gaertner wrote:
On Wed, 4 Oct 2006 09:27:03 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:

Changing a property can change various others as well. For example
changing the Width can change child controls, siblings and parent.
Yes, but applying this change to the child form should result in
exactly the same consequences, unless the affected components were
changed already... ?

Michael.
Mattias,

This is where my implementation of the Observer using BeginUpdate and
EndUpdate plays a roll. See the tiOPF code I sent you.  Normally the
Subject (FormA) would fire off the Notify method for every small
change which could cause lots of screen redraws.  BeginUpdate and
EndUpdate allows you to make all those small changes and then fire off
a single Notify call.

BeginUpdate can only be called for the IDE tools (OI, AE, ...). The
component editors will only call the Modified event.
But there is a solution:
We could call the update on Idle.

Not really a nice option and hard to work with if some who knows future designer plugin needs the result of a modification (I'm just making things up here).

But...
component editors call Modified. This Modified method can use Begin/EndModification. If this is passed to the "derived form" observer, it knows whan all modifications are done (and can update itself)

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to