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

Home » Public Forums » archive » Re: How to retrieve information from an event to use it in another event?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to retrieve information from an event to use it in another event? [message #54635 is a reply to message #54489] Tue, 19 June 2007 20:49 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Jun 19, 10:54 am, hradilv <hrad...@yahoo.com> wrote:
> make an info structure in your "main" program like:
> info = {fid1:(-1), fid2:(-1), nb1:0L, nb2:0L .. etc }
> make a pointer to that
> infoptr = ptr_new(info)

Don't forget to save the pointer in the tlb's UVALUE:

widget_control, tlb, set_uvalue=infoptr

> in your event function put:
> widget_control, event.top, get_uvalue=infoptr
>
> Then you can look use (*infoptr).fid1, etc...

Yes, this is the basic idea most people use when writing widget
programs. Save information in fields of a structure that is stored
(either directly or via a pointer) in the top-level base's UVALUE.
If you use a pointer, be sure to free the pointer when the program
finishes (use the CLEANUP keyword to XMANAGER).

Mike
--
www.michaelgalloy.com
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Encoding of IDL strings
Next Topic: Re: history of command prompt

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

Current Time: Thu Oct 09 21:47:51 PDT 2025

Total time taken to generate the page: 0.31896 seconds