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 #648] Wed, 09 December 1992 00:35 Go to previous message
hm342st is currently offline  hm342st
Messages: 2
Registered: September 1992
Junior Member
> 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.


This is not completely true concerning the common blocks. The first time
using the widget set I was misleaded by the examples and used UVALUE just
as an identifier. No idea assigning 'real' data to it.

I found a solution using common blocks. They are not as bad as it seems.
It really depends on the data connected to them! I used list structures
which are fairly easily to handle. Using e.g. the base_widget as a key
in the list, it was possible to do all the things I, of course, better
should have done using a more comlex UVALUE (multiple instances).

Nowadays I am using UVALUEs, but I could not get rid of the lists, either.
I think, Vers. 3.0 with its possiblity to find out some relations between
widgtes will remove further lists.



- J"org


Reply-To: joerg.plewe@mpi-dortmund.mpg.de
[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: Fri Oct 10 00:03:57 PDT 2025

Total time taken to generate the page: 0.39955 seconds