- Texts in Forms?

From: [at]} <Wojtek>
Date: Fri, 22 Apr 2005 09:24:38 -0400 (EDT)

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

Rene:

  I faced a similar problem when I wrote Gr. In my case I wanted
to display my own view in a form (a graphical display of histograms)
and I wanted the user to interact with that view. I grappled with
the design for quite a while. Folks at OuS helped me to find
a solution (many thanks to Wolfgang and Cuno). Please have a look
at Gr demo program GrDAQDemo. In particular, try a panel named
DAQ Panel Demo (execute GrDAQDemo-New DAQ panel). When you open
that panel, you will see an empty plotter in the middle. There is
a button Start DAQ. Once you press that button, the program
starts talking to the plotter. Press the button Acquire and you will
see the data displayed there.

Also try the menu item GrPlotter->New Empty Plotter. This will
open a free-floating empty plotter. The program is not talking to it.
Now execute GrDAQDemo->Connect DAQ to plotter. From this point
the DAQ demo program is talking to this plotter. (It gets disconected
from the previous one). Press the Acquire button and you will see
the spectrum growing in the new plotter.

Also, try "Read histo from disk demo". It will show you the same
technique. It will also show how to open and read an ASCII file from
disk, and display its content in the view embedded in a Form.

These demos work with a single view in a form. I also have programs
with several GrViews embedded in the same form. There is a way
to find each one. This could be a starting point for a Chat form
in which you have two text windows, an incoming and outgoing chat.

In a nutshell, the "connect" procedures show you how you can find
a view that is somewhere in the display space. You first create
a form with an empty view (a GrView in my case), save to disk, and
then later open it and connect to this view.

My examples work with GrViews where I have written some methods
to make this easier for myself. Study those methods and you will see
which BlackBox calls I am using. These calls wee suggested to me
by Cuno and Wolfgang.

Hope this will get your feet wet. Cheers,

W.


On Fri, 22 Apr 2005 rene.krywult{([at]})nowhere.xy

> I want to use the COMM Subsystem for a chat-program.
>
> The communication-part is quite easy, but there's one thing
> that poses a challenge to me:
>
> I want the users to enter their texts in a text field, and
> when they press enter, the text is sent to the recipient
> (so far so easy). I don't want the server to open a new
> TextView in a new window, but to have that textview in a
> form.
>
> So, my form consists of a textfield, a "Send"-Button,
> a "Close"-Button and a textview.
>
> How do I implement the textview in the form?
>
> I can copy a textview into a form, but I see no way to link
> it to my TextModels.Model variable. And "Properties" always
> shows the Font properties, instead of the TextView-
> Properties.
>
> Any ideas?
>
> Rene

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIFJlbmU6XHBhcg0KXHBhcg0KICBJIGZhY2VkIGEg
c2ltaWxhciBwcm9ibGVtIHdoZW4gSSB3cm90ZSBHci4gSW4gbXkgY2FzZSBJIHdhbnRlZFxwYXIN
CnRvIGRpc3BsYXkgbXkgb3duIHZpZXcgaW4gYSBmb3JtIChhIGdyYXBoaWNhbCBkaXNwbGF5IG9m
IGhpc3RvZ3JhbXMpXHBhcg0KYW5kIEkgd2FudGVkIHRoZSB1c2VyIHRvIGludGVyYWN0IHdpdGgg
dGhhdCB2aWV3LiBJIGdyYXBwbGVkIHdpdGhccGFyDQp0aGUgZGVzaWduIGZvciBxdWl0ZSBhIHdo
aWxlLiBGb2xrcyBhdCBPdVMgaGVscGVkIG1lIHRvIGZpbmRccGFyDQphIHNvbHV0aW9uIChtYW55
IHRoYW5rcyB0byBXb2xmZ2FuZyBhbmQgQ3VubykuIFBsZWFzZSBoYXZlIGEgbG9va1xwYXINCmF0
IEdyIGRlb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ZG93LCBidXQgdG8gaGF2ZSB0aGF0IHRleHR2aWV3IGluIGFccGFyDQo+IGZvcm0uXHBhcg0K
PlxwYXINCj4gU28sIG15IGZvcm0gY29uc2lzdHMgb2YgYSB0ZXh0ZmllbGQsIGEgIlNlbmQiLUJ1
dHRvbixccGFyDQo+IGEgIkNsb3NlIi1CdXR0b24gYW5kIGEgdGV4dHZpZXcuXHBhcg0KPlxwYXIN
Cj4gSG93IGRvIEkgaW1wbGVtZW50IHRoZSB0ZXh0dmlldyBpbiB0aGUgZm9ybT9ccGFyDQo+XHBh
cg0KPiBJIGNhbiBjb3B5IGEgdGV4dHZpZXcgaW50byBhIGZvcm0sIGJ1dCBJIHNlZSBubyB3YXkg
dG8gbGlua1xwYXINCj4gaXQgdG8gbXkgVGV4dE1vZGVscy5Nb2RlbCB2YXJpYWJsZS4gQW5kICJQ
cm9wZXJ0aWVzIiBhbHdheXNccGFyDQo+IHNob3dzIHRoZSBGb250IHByb3BlcnRpZXMsIGluc3Rl
YWQgb2YgdGhlIFRleHRWaWV3LVxwYXINCj4gUHJvcGVydGllcy5ccGFyDQo+XHBhcg0KPiBBbnkg
aWRlYXM/XHBhcg0KPlxwYXINCj4gUmVuZVxwYXINClxwYXINCi0tLSBCbGFja0JveFxwYXINCi0t
LSBzZW5kIHN1YmplY3QgSEVMUCBvciBVTlNVQlNDUklCRSB0byBibGFja2JveEBvYmVyb24uY2h9
fQBjaGVuLkRFDQpS


----boundary-LibPST-iamunique-1489252809_-_---
Received on Fri Apr 22 2005 - 15:24:38 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:17 UTC