comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Sharing an info structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Sharing an info structure [message #19950] Sat, 06 May 2000 00:00
Daniel Peduzzi is currently offline  Daniel Peduzzi
Messages: 29
Registered: June 1999
Junior Member
Mark Guagenti wrote in message ...
>
> Hello,
> I'm just starting to learn IDL and am working on an application that has a
> main window(widget) and also has another window(widget) that I want to use
> as a toolbar. My problem seems to be when I call a procedure when one of
> the buttons gets clicked from the toolbar. 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. If
> anyone could please explain how I can do this it would be very
> apreciated. Thanks!
>

One way to do this is to save the main window TLB identifier as a user
value for your toolbar TLB. Then, whenever you write an event_pro for
a button on your toolbar, you can include the lines:

widget_control, event.top, get_uvalue=main_tlb
widget_control, main_tlb, get_uvalue=info


Dan

---------------------------------------
Dan Peduzzi
peduzzi@mediaone.net
---------------------------------------
Re: Sharing an info structure [message #19951 is a reply to message #19950] Sat, 06 May 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Struan Gray (struan.gray@sljus.lu.se) writes:

> Cor. 1:3
>
> I first read that as 1 Cor. 13. Hope and Faith are essential
> in IDL progamming. This newsgroup provides the Charity.

Amen to that! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Sharing an info structure [message #19952 is a reply to message #19950] Sat, 06 May 2000 00:00 Go to previous message
Struan Gray is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: avhrr proccessing
Next Topic: Re: Func define

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:16:14 PDT 2025

Total time taken to generate the page: 0.00612 seconds