>In my first attempt I used a FormModels.Reader
>to iterate over Views in a Form to find a view of the
>proper type. This did not work until the crucial
>observation was told by DG: open the Form as a Tool
>dialog, not as an Aux dialog as recommended in Chapter 8.
>After I tried the Tool dialog, the button worked.
>
>Then I tried DG's recommendation "use the methods
>GetFirstView and GetNextView". It took a while to realise
FormModels.Reader for iteration over a form is fine.
The container methods GetFirst/NextView are more
general, in that they are not limited to Form containers. But
the straight-forward form readers are the more
obvious approach. For source code examples, see
module FormCmds.
>Both cease to work when the GrView is wrapped
>in a scroller (Tools --> Add Scroller).
If you want to retrieve a particular view (e.g., your plotter
view) by some special criteria, provided it is in a focus path,
you could send your own controller message along the focus
path, and answer it in the view. How to use such a "probe"
message can be seen from the Forms sources
(see FormControllers.PollFocusMsg). This also
works for a view within a wrapper, if the wrapper allows
its wrapped view to receive controller messages.
Cuno Pfister
Oberon microsystems, Inc.
Received on Sat Feb 20 1999 - 21:21:54 UTC