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

Home » Public Forums » archive » Compound Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Compound Widgets [message #67798] Sat, 29 August 2009 06:49
weclifton is currently offline  weclifton
Messages: 12
Registered: May 2007
Junior Member
Hi,

I've been creating my own widgets sucessfully for a while but want
to leverage existing compound widgets for common tasks (duh). My
problem is I do not understand how to incorporate them into my
applications -- for example, I would like to use the cw_light_editor.

I add it to a base widget (triggered by a menu event):

Pro edit_lighting, event

;Retreive pointer to structure of parameters to be passed between
events
Widget_Control, event.top, GET_UVALUE=info

;Create base widget for light editor
lightingBase=Widget_Base(COLUMN=1, TITLE='Lighting', GROUP_LEADER=
(*info).tlb, UNAME='lightingBase')

;Create compound widget, add my light object
lightEditor = cw_light_editor(lightingBase, light=(*info).oLight0)

;Realize the base/compound widget
Widget_Control, lightingBase, /REALIZE

End

My light object is simply:

;Create light object (oLight0 is added to the parameter structure)
oLight0 = Obj_New('IDLgrLight')

;Set some properties
oLight0->SetProperty, $
INTENSITY= 0.500000, $
LOCATION= [10.0000000, 10.0000000, 20.0000000], $
TYPE= 2 ;Directional

;Add the light to my model object
oModel->Add, oLight0

When I run this, my application freezes and IDL throws a fatal error.

What am I doing wrong? I've looked at the xdice.pro example and David
Fanning's book, but still can't figure out what is going on.

Thanks,
Bill
[Message index]
 
Read Message
Previous Topic: Re: Image statistics via moving window
Next Topic: Array elements extraction

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

Current Time: Sun Oct 12 07:16:42 PDT 2025

Total time taken to generate the page: 0.95776 seconds