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

Home » Public Forums » archive » Re: ? Weird DRAW widget VALUE ?
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: ? Weird DRAW widget VALUE ? [message #14135 is a reply to message #14131] Thu, 28 January 1999 00:00 Go to previous messageGo to previous message
Peter Cornelius is currently offline  Peter Cornelius
Messages: 6
Registered: January 1999
Junior Member
Re...

Thank you very much for your responses:

David Foster <foster@bial1.ucsd.edu> wrote:

> I would guess that the order of parameters in your common-block
> is incorrect, as the string you are getting looks like it's
> associated with a button or label widget, and you're passing
> this widget to CW_DEFROI().

<rmlongfield@my-dejanews.com> wrote:

> 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.

Well, maybe both of you are right, I don't really know. DRAW288_Id does
work with all WSETs that occur in the code. But it contains the 'IDL window
number' (says the manual):

PRO MainProg, GROUP=Group
[...]
DRAW288 = WIDGET_DRAW( BASE290, $
BUTTON_EVENTS=1, $
MOTION_EVENTS=1, $
RETAIN=2, $
UVALUE='MainViewDraw', $
XSIZE=741, $
YSIZE=574)
[...]
WIDGET_CONTROL, DRAW288, GET_VALUE=DRAW288_Id
[...]
END

This window number (more or less) obviously is something different
from a 'window id', which in this case is stored in DRAW288. And
CW_DEFROI only accepts window ids, not window numbers. So, for
the time being, I added DRAW288 to my DRAW_Comm block, and it now
sort of works. Thanks a lot.

Still though, the STRING persists, but it seems not to do any harm
(here and at this point...). Just to close this thread, here's the
code snippet:

[...]
'DISPLAY.Display Mode.ROI': BEGIN
MESSAGE, 'Event for DISPLAY.Display Mode.ROI', /INFORMATIONAL
JUNK = WIDGET_INFO(DRAW288_Id, /NAME)
PRINT, 'HELP, JUNK :' & HELP, JUNK
WSET, DRAW288_Id
WIDGET_CONTROL, DRAW288_Id, GET_VALUE=win
PRINT, 'HELP, WIN :' & HELP, win
PRINT, 'HELP, DRAW288_Id :' & HELP, DRAW288_Id
PRINT, 'HELP, DRAW288 :' & HELP, DRAW288
ROI=CW_DEFROI(DRAW288,/RESTORE)
PRINT, 'HELP, ROI :' & HELP, ROI
END
[...]

now produces:

% PDMENU298_EVENT: Event for DISPLAY.Display Mode.ROI
HELP, JUNK :
JUNK STRING = 'BUTTON'
HELP, WIN :
WIN STRING = 'Display Mode'
HELP, DRAW288_Id :
DRAW288_ID (DRAW_COMM)
LONG = 32
HELP, DRAW288 :
DRAW288 (DRAW_COMM)
LONG = 52
% Compiled module: CW_DEFROI.
% Compiled module: CW_BGROUP.
HELP, ROI :
ROI LONG = Array(57730)

I'm afraid, I'll have to leave that to those with further insight.
Ask me if I can be of any help, if there's still interest in this.

Now, after another lenghty posting, thank you all again, I will now
go on and try to produce some other image from this ROI array...

Best regards,

Peter.
---
Peter Cornelius <pcNOSPAM@inr.fzk.de>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI - IDL display question
Next Topic: disappearing feature?

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

Current Time: Wed Oct 08 19:01:50 PDT 2025

Total time taken to generate the page: 0.00435 seconds