Re: [BLACKBOX] Opening an embedded form view

From: [at]} <Josef>
Date: Tue, 8 Dec 2009 20:29:19 +0100

----boundary-LibPST-iamunique-851198523_-_-
Content-type: text/plain

> Now, to what should the control be linked?

The interactor acts as the 'model' of the view
(a control is a special kind of view).
It contains its data. For example, a global string variable
contains the data to be displayed and edited by a Text Field control.
The Text Field control is something else than
the string variable it is linked to.
As far as I know it must not be a RECORD but can be
any global variable.

In principle you can also go without linking to a global variable
and maintaining the state in the view itself.
But then it becomes more complicated to access the
state on behalf of a command. You would need to scan the controls
of a form and select the one you are interested in.


> (2)

When a form is opened, all embedded views (and controls)
are instantiated and all required modules are loaded.
If the control is linked to a globale variable of some module
that module will be loaded as well because the control will try
to access the value of the global variable in order to display its value.
All you need to know should be that everything is loaded when it is first imported
or requested via some meta programming facility.


> (3) So now, assume that myView has been created correctly and that the form is
happy and could find a non NIL myView. Who opens myView?

A view (or control) embedded in a form will be opened in exactly
the same state as it has been saved before.
So it will have the same size in the containing form as it had at the time of saving.
I have not seen any BB control that adjusts its own size within the enclosong form.
This is probably possible but is a fairly complicated task because it may also
affect the layout of other controls. Essentially you would need something like a
Java LayoutManager if you need to adjust the size of a control in a form.


> (4) Scanning the views in a form looking for myView:
> I have tried to use FormViews.Focus() when I press a button in the form
> but it always comes back NIL.

Interesting.
Use Controllers.FocusView() and check what it returns.
May be you are clicking in the wrong view, e.g in a TextView
or for some reason your form view does not receice focus.

- JT


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-851198523_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2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nRyb2xsZXJzLkZvY3VzVmlldygpIGFu
ZCBjaGVjayB3aGF0IGl0IHJldHVybnMuXHBhcg0KTWF5IGJlIHlvdSBhcmUgY2xpY2tpbmcgaW4g
dGhlIHdyb25nIHZpZXcsIGUuZyBpbiBhIFRleHRWaWV3XHBhcg0Kb3IgZm9yIHNvbWUgcmVhc29u
IHlvdXIgZm9ybSB2aWV3IGRvZXMgbm90IHJlY2VpY2UgZm9jdXMuXHBhcg0KXHBhcg0KLSBKVFxw
YXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ug
d2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0h9
fQBTVFMu
----boundary-LibPST-iamunique-851198523_-_---
Received on Tue Dec 08 2009 - 20:29:19 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:39 UTC