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

Home » Public Forums » archive » Re: Help with widgets code
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 with widgets code [message #649 is a reply to message #648] Tue, 08 December 1992 13:29 Go to previous message
mberkley is currently offline  mberkley
Messages: 5
Registered: December 1992
Junior Member
> On Mon, 7 Dec 1992 19:49:25 GMT, scowen@wfpc3.la.asu.edu (Paul A. Scowen) said:

PAS> Now, what I'm faced with is a lack of communication between the
PAS> two proc's. For instance, if I have displayed my fabulous image
PAS> into the draw widget, and then hand off control to the xmanager,
PAS> but then decide that I want a button (already defined) to
PAS> initiate a redraw of the image but using the log of the data, how
PAS> do I tell the event proc what the original image array was?
PAS> There appears to be no way to pass this information across the
PAS> xmanager call?

You need to use the UVALUE of one of the widgets; the top level widget
works best.

Before XMANAGER call:

WIDGET_CONTROL,SET_UVALUE=mydata,topwidget



In event handler:

WIDGET_CONTROL,GET_UVALUE=mydata,event.top



mydata can be an anonymous structure, an array, anything you want.

A few hints:

1. Don't use common blocks in widgets ever: you pay for them later
if you want to support multiple instances of any particular
widget. IDL sample widgets (e.g. animate,slicer) suffer from this
problem.

2. Remember that the uvalue is a copy of the original data, not a
pointer to it. This is usually not a problem, but I had some
problems with passing huge structs around because I could only
pass a copy and not a pointer.


Mike Berkley
mberkley@sirius.UVic.CA
[Message index]
 
Read Message
Read Message
Previous Topic: Complex SVD needed
Next Topic: Re: Complex SVD needed

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

Current Time: Sat Oct 11 08:06:54 PDT 2025

Total time taken to generate the page: 1.44031 seconds