Guards and notifiers

From: [at]} <Wojtek>
Date: Wed, 03 Mar 1999 14:04:26 -0800

I have written a View module where the view has
some visible attributes, like e.g. plot labels.
I can instantiate several such plots on screen at the
same time, each one with different plots, and hence
different labels.

I am now trying to be able to change any of these labels
by having a Tool dialog, which would adapt itself to
currently focused view. When the view being focused
is changed, the labels in the Tool dialog would change
to be the ones of the currently focused view.

Somehow this does not work. I tried a Notifier, which would

fetch the labels from the focus view, put into an interactor,
and then call Dialogs.Update on that interactor. However,
the Notifier is called only when I click on the "set" button.
What I need is its being called when the focused view changes.

Then I looked at Guards, but the documentation makes a very
strong statement in chapter "8.5 Notifiers" that

   A control guard sets up the temporary state of a control,
   such as whether it is disabled or not. It has no other effect.
   It doesn't modify any interactor state.

This is what Notifiers are supposedly for, but they are called
at the wrong time to do what I want them to do.

Is there some trick that I am missing, or should I just
go ahead and disregard what is said above and change
interactors within the guards, even though docu says
this should never be done?

Comments anybody?

Wojtek
Wojtek Skulski
X-Ray Instrumentation Associates
2513 Charleston Rd #207, Mountain View, CA 94043, USA
Tel: 650 903 9980 ext. 16 Fax: 650 903 9887
E-Mail: skulski{([at]})nowhere.xy
Received on Wed Mar 03 1999 - 23:29:55 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:42 UTC