Re: How to access a View in a Form

From: [at]} <Wojtek>
Date: Fri, 19 Feb 1999 13:44:38 -0800

Hi:

I am writing this message, hopefully the last one
on this subject, to the mailing list because it looks
like a simple question required an amazigly complex
answer. This is something to consider for BB documentation,
since solutions described in Chapter 8 of Cuno's book
did *not* help to produce the desired effect.

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
that GetFirstView is a method of neither the view nor

of its model, but rather of the Containers.Controller,
which is not a standard View thing. Thus, relevant docu
was System/Docu/Containers.odc. Having my previous
reader solution already working it took only a while
to invent the necessary program line, which looks
like this (far enough from the initial simple task
"make a button operate on a view sitting nearby"):

   ctrl := fmv.ThisController() (Containers.Controller);

Both solutions work equally well for a Tool form,
and they both do *not* work for an Aux form.
Both cease to work when the GrView is wrapped
in a scroller (Tools --> Add Scroller).


For those interested I am attaching the 2nd variant
of the module (I can send the whole package to anyone
that wants to see it and to reproduce the behavior.)
The trace printouts are attached to the end of the module.
They illustrate how good old Out is indispensible
when trying to diagnose such a situation.


A side remark: the complexity of this whole story
puts BB on par with Unix, where nothing simple is simple.
That's sort of surprising to me. Hopefully, stories like
this one can be helpful to improve the documentation.

2nd side remark: In Wolfgang's Edu package the Sort dialog
is opened in Aux mode, and the package still works.
Also, the Sort view there is wrapped in a scroller,
and the package still works. It thus looks like
the Edu package dealt with both secrets: how to
arrange the button --> view communication in Aux dialogs,
and how to overcome the scroller firewall. It is sort of
discouraging to me that the Author of an allegedly
educational package did not reveal how this was done.
Maybe Oberon Microsystem's can obtain that secret
knowledge and use it to elucidate their Form documentation.


Hope it helps.

Wojtek

StdCoder.Decode ..,, ..ek,...3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
 hXhC6FU1xhiZiVBhihgmRiioedhg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ikmj,6..kDU.U,.DONRPNh
 PMmLT5.2UEC.6..mEw7169rwKiEw3c0Cy2xBq4sET1.UH.,..W.0.2,2Ukybn76Dtc0MyfU.az
 86A58O0OJW7mc0...
 --- end of encoding ---
Received on Fri Feb 19 1999 - 22:59:36 UTC

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