| Re: Sharing an info structure [message #19952 is a reply to message #19950] |
Sat, 06 May 2000 00:00  |
Struan Gray
Messages: 178 Registered: December 1995
|
Senior Member |
|
|
Mark Guagenti, mgenti@evansville.net writes:
> I want to be able to get the the structure (called info)
> that is used for my top level base, and use that information
> in the procedure I called from my toolbar window.
There are many ways to do this, but the simplest is to get your
toolbar to use WIDGET_CONTROL /SEND_EVENT to send a new, custom event
to the top level base and to call the actual procedure from the top
level base's event handler. The custom event must have the correct
first three fields, but you can put whatever you like in subsequent
fields to tell the top level base where the event is coming from or
what it should do. Alternately, make the custom event a
non-anonymous, named structure and the top level base's event handler
can test all events for that particular structure name using the
TAG_NAMES /STRUCTURE_NAME function.
The 'modern' and more flexible way is to make your widgets into
objects and have the toolbar call a method belonging to the top level
base. This isn't as hard as it sounds and is very powerful as a
general technique.
> 1 Cor. 1:3
I first read that as 1 Cor. 13. Hope and Faith are essential
in IDL progamming. This newsgroup provides the Charity.
Struan
|
|
|
|