RE: adding text and beyond

From: [at]} <Wojtek>
Date: Wed, 3 Sep 2003 12:47:28 -0400 (EDT)

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

Hi:

> An interesting idea to enhance the forms editor like this. Less expicitly I
> remember copying the scrolling ticker view (see Obx examples) and pasting it
> onto a form. The line happily kept on moving within the form, so I presume
> it remains under the control of the program.

It does remain under the control. In Gr I have defined an explicit menu
item to embed views into the container such as Text or Form. The menu
item works with both. Here are the first two menu items from the Gr menus.
The 1st item creates the free-floating GrView. The 2nd item embeds the
view at the caret, which can be either in the Form or in the Text, or
presumably in any other container view which supports the full BB protocol
(I am not aware of any such containers other than Forms or Texts).

MENU "GrPlotter"
        "New empty plotter" "" "GrViews.CreateAndDeposit;
StdCmds.Open" ""
        "Embed Plotter" "" "GrViews.CreateAndDeposit;
StdCmds.PasteView" ""

Note that the only difference is in the StdCmds part. The StdCmds.Open
sends the GrView to the desktop, while StdCmds.PasteView sends the GrView
to the caret location in a container, if there is any.

In the bigger picture, this menu serves all my needs when I want to
create a form with a GrView embedded in it. I have created tons of such
forms, and I never felt any criticism towards the standard form editor.

I want to add, that when you go along this route, most likely you will
encounter a problem "how do I communicate with an embedded view from/to
my code?" I mean, I embed the view. It sits in some Form or Text right
in front of my eyes. Now what? How do I "talk" to the view?

The classic Oberon System way was by broadcasting messages to the display
space, and listen to the echo coming back. This is possible under BB
via the "broadcast" and "omnicast", though from the docu it looks as if
this classic way has been de-emphasized under the BB. It should work,
but I presume it will be slow.

In Gr I have taken a different approach. I obtain the pointer to the view,
and then I talk to the view directly. There are two different ways to
obtain the pointer. (a) In case the GrView is a singleton in a given form,
I find this single GrView by type-testing; see the procedure GrViews.Focus.
(b) In case there is more than one GrView in a given container,
I find a given one by a unique name; see the procedure
GrViews.RetrieveFromContainer for details.

Once I have a pointer to the view, I can interact with this view
directly.

Hope this will help you get started with your own projects.
Feel free to dissect Gr and learn from the examples.


> It would be more obvious to
> have an explicit insert function in the forms editor where a link could be
> made with a view variable of a module.

I just showed how you can create your own menu item to deal with your own
type of views.

> All this gives the typical BlackBox feel: Tantalizingly close, but ... . I
> hope something will come of it beyond the scripture "You can extend the
> forms editor yourself".

My hint is "provide your specific methods in your own package; do not mess
with other packages which are fine the way they are now".

Hope this helps,

Wojtek



--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.



----boundary-LibPST-iamunique-1516240165_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpOlxwYXINClxwYXINCj4gQW4gaW50ZXJlc3Rp
bmcgaWRlYSB0byBlbmhhbmNlIHRoZSBmb3JtcyBlZGl0b3IgbGlrZSB0aGlzLiBMZXNzIGV4cGlj
aXRseSBJXHBhcg0KPiByZW1lbWJlciBjb3B5aW5nIHRoZSBzY3JvbGxpbmcgdGlja2VyIHZpZX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1cnJlbnQgcG9zdGluZyBwb2xp
Y3k6XHBhcg0KXHBhcg0KYSkgVG8gcG9zdCB5b3Ugc2hvdWxkIHVzZSB0aGUgc2FtZSBhZGRyZXNz
IGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCB0byB0aGUgbWFpbGluZyBsaXN0LiBUaGF0IHdh
eSwgdGhlIGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlvdSBhcyBzdWJzY3JpYmVyIGFuZCBm
b3J3YXJkIHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0aG91dCBjcmVhdGluZyBhbnkgb3Zl
cmhlYWQuXHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJlYXNvbiwgeW91IGNhbm5vdCBwb3N0
IGZyb20gdGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCwgeW91ciBtZXNz
YWdlIHdpbGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0uIFBsZWFzZSB1bmRlcnN0YW5kIHRo
YXQgbW9kZXJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNvbWUgZGVsYXksIGluIHBhcnRpY3VsYXIg
b3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5c319AEVEVCkNCkRhdGU6


----boundary-LibPST-iamunique-1516240165_-_---
Received on Wed Sep 03 2003 - 18:47:28 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:05 UTC