Re: ? Weird DRAW widget VALUE ? [message #14140 is a reply to message #14135] |
Thu, 28 January 1999 00:00   |
rmlongfield
Messages: 68 Registered: August 1998
|
Member |
|
|
In article <36AEF212.DA00E826@inr.fzk.de>,
Peter Cornelius <pc@inr.fzk.de> wrote:
> Re again...
>
> With IDL 4.0.1 on Windoze95, I am trying to use some code like:
>
> [...]
> PRO PDMENU298_Event, Event
>
> COMMON DRAW_Comm
>
> CASE Event.Value OF
> [...]
> 'DISPLAY.Display Mode.ROI': BEGIN
> MESSAGE, 'Event for DISPLAY.Display Mode.ROI', /INFORMATIONAL
> WSET, DRAW288_Id
> WIDGET_CONTROL, DRAW288_Id, GET_VALUE=win
> HELP, DRAW288_Id
> HELP, win
> ROI=CW_DEFROI(DRAW288_Id)
> HELP, ROI
> END
> [...]
> ENDCASE
> END
> [...]
>
> But what I get is the following:
>
> % PDMENU298_EVENT: Event for DISPLAY.Display Mode.ROI
> DRAW288_ID (DRAW_COMM)
> LONG = 32
> WIN STRING = 'Display Mode'
...some stuff clipped...
> Now, I expect CW_DEFROI to be in order, what puzzles
> me is that I get STRING as return, although the DRAW288_Id
> is ok (it's in the COMMON DRAW_Comm block 8-S). In CW_DEFROI,
> it hangs just at the lines
>
> [...]
> WIDGET_CONTROL, draw, GET_VALUE=win
> WSET, win
> [...]
>
> which obviously doesn't work with a STRING. Is there anyone who
> can give me a hint how this STRING could have gotten into
> win?
>
Hi Peter,
Your statement: WIDGET_CONTROL, draw, GET_VALUE=win
is getting a value from "draw" but I suspect that "draw" is not the drawID of
the WIDGET_DRAW. Do you have a button widget defined with the value of WIN?
> WIN STRING = 'Display Mode'
It looks to me that DRAW288_Id is not the ID of WIDGET_DRAW. Try printing it
in the main program and then print it again in the event program to check
whether they are the same number. I am also puzzled about why you write
earlier : WSET, DRAW288_Id since this is the WIDGET_DRAW id and not the window
ID. Maybe WSET is messing up the DRAW288_Id somehow.
Hope this helps.
Rose
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
|
|
|