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

Home » Public Forums » archive » HELP !!!
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: Help ! [message #14903 is a reply to message #10451] Thu, 01 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
VU KHAC Tri (tvk@info.fundp.ac.be) writes:

> I write a procedure which reads an image when a button pressed.
>
> pro BTLoad_Event, event
> WIDGET_CONTROL, event.id, GET_UVALUE = info
> fname = DIALOG_PICKFILE(FILE = info.filename, /READ, FILTER = '*.hdr',
> $
> /MUST_EXIST, /FIX_FILTER, PATH = path, /NOCONFIRM)
> IF fname NE "" THEN BEGIN
> Read_Analyze, fname, info.image
> ;^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ENDIF
> end
>
> pro Read_Analyze, File, Image
> ;it reads some data from the file and modifies some fields in Image
> end;
>
> I see that in the Read_Analyze, data is read correctly, but in
> BTLoad_Event, info.image is not modified. Anyone can tell me why ?

Because info is a LOCAL variable in this procedure. (You
copied the information in the User Value of the top-level
base into the LOCAL variable info.) If you make changes,
you have to be sure to put it back in the UVALUE before
you exit the event handler:

WIDGET_CONTROL, event.id, SET_UVALUE = info
END;

I still have two cheap IDL Programming books left.
Lot's of information about widget programming there. :-)

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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Raster DEM to DXF Contours
Next Topic: WRITE_TIFF

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

Current Time: Thu Oct 09 20:06:56 PDT 2025

Total time taken to generate the page: 0.40065 seconds