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

Home » Public Forums » archive » cgWindow - what am I doing wrong that makes winID change values?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
cgWindow - what am I doing wrong that makes winID change values? [message #91219] Wed, 17 June 2015 14:54 Go to previous message
BLesht is currently offline  BLesht
Messages: 89
Registered: March 2007
Member
I clearly don't understand the winID feature of Coyote graphics. This keyword is supposed to make it possible to direct graphics commands to different previously opened windows (winid = [the identifier of the window you want]). I'm finding, however, that the act of directing a graphics command to a window seems to change its winID. Consider the following example (IDL8.2, MacOSX10.8.5, Coyote graphics revision 1540):

IDL> cgWindow, wTitle = 'Window 1' ; Open the first window
IDL> w1ID = cgQuery(/Current) ; Determine its ID number
IDL> PRINT, w1ID ; Yup, it's 32
32
IDL> cgWindow, wTitle = 'Window 2' ; Open another window
IDL> w2ID = cgQuery(/Current) ; Get its ID number
IDL> PRINT, w2ID ; This one is 33
33
IDL> PRINT, w1ID ; The first ID still is 32
32
IDL> cgWindow, 'cgPlot', [0,10], [0,10], winID=w1ID, /AddCmd ; Plot something
IDL> PRINT, w1ID ; Oops - what happened to w1ID?
0
IDL> cgWindow, 'cgPlot', [0,10], [0,10], winID=w2ID, /AddCmd ; Try window 2
IDL> PRINT, w2ID
1 ; Same problem

Could this have something to do with giving the window titles? Seems strange to me. Thanks for any insights.

Barry
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: croping jpeg image
Next Topic: formatting y-axis when plotting relative frequency using cgHistoplot

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

Current Time: Wed Oct 08 11:59:53 PDT 2025

Total time taken to generate the page: 0.00249 seconds