IDL 8.1 question FOREACH oVis ... [message #78046] |
Wed, 19 October 2011 12:05 |
Rodger_Reinhart
Messages: 3 Registered: October 2011
|
Junior Member |
|
|
Enjoying IDL 8.1
Question of the FOREACH
FOREACH oVis, oSelect do oVis.Select, /UNSELECT
; Unselect each visible object in the window
Trying to understand the oVis.
I am used to the element statement here
Is oVis a built in keyword like "element"
Or is it uniqe the th oSelect graphics objects
Thanks
Rodger
;---------------------------------------
FUNCTION RBBoxMouseUp, oWin, x, y, iButton
state = oWin.uvalue
IF (~state.buttonDown) THEN RETURN, 0
; take care of case where mouse is down on progrma start ?
; Button has been released
x0 = state.x0
y0 = state.y0
xVector=[x0,x0,x,x,x0]
yVector=[y0,y,y,y0,y0]
xy = state.poly.ConvertCoord(xVector, yVector, /DEVICE, /TO_NORMAL)
state.poly.SetData, REFORM(xy[0,*]), REFORM(xy[1,*])
state.poly.LINESTYLE='-'
state.buttonDown=0
oWin.uvalue=state
; Clear the current selections
oSelect = oWin.GetSelect() ; Array of selected objects from the graphics window
FOREACH oVis, oSelect do oVis.Select, /UNSELECT
; Unselect each visible object in the window
|
|
|