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

Home » Public Forums » archive » iTool Panel UI - getting info from launch routine
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
iTool Panel UI - getting info from launch routine [message #37381] Mon, 15 December 2003 14:22
sdettrick is currently offline  sdettrick
Messages: 14
Registered: December 2003
Junior Member
Hi,

I'm trying to build an iTool with a Panel UI, as in the iTool
developer's guide, chapter 13, p 252+. Part of my PUI (!) is a
CW_BGROUP(), i.e. a group of buttons (or if you like a WIDGET_LIST(),
same question will apply). My problem is I want to make the list of
buttons (or the list in the widget_list()) an argument to my iTool
LAUNCH routine, e.g. I would like to write:
IDL> mytool,x,buttonlist=["tom","dick","harry"]
and have the PUI show a group of buttons with labels "tom", "dick",
"harry".

So the question is, how do I "piggyback" the buttonlist array from the
launch routine into the PUI routine, without using a common block?

Since the PUI is created in the Launch routine (mytool.pro) using the
ITREGISTER command,
ITREGISTER, "My Panel", "myPanel", TYPE="EXAMPLE",/UI_PANEL
there is no obvious way to make the
buttonlist(=["tom","dick","harry"]) a part of a state structure, as
one would normally do with the UVALUE of a top level base.

I have tried to build an object out of BUTTONLIST;
listobj = obj_new('myListObject', buttonlist )
which I have then turned into an IDLitData object;
list_data = obj_new( 'IDLitData', listobj )
which I have then added to the parameter set;
oParmSet -> Add, Plot_List_data, PARAMETER_NAME="BUTTON LIST"
which I then hoped to access via oTool in the Panel procedure:

PRO myPanel, wPanel, oUI
oTool = oUI -> GetTool()
oWin = oTool -> GetCurrentWindow()
oView = oWin -> GetCurrentView()
oCont = oView -> GetByIdentifier( 'Visualization Layer/Data
Space Root/Data Space/Contour' )
oParams = oCont -> GetByIdentifier('Parameters')
oData = oParams -> GetByName( "BUTTON LIST" )
ok = oData -> GetData( Plot_List )

However, while the iTool is being created, the above hierarchy
apparently has not yet been created (though this is the correct
hierarchy, after creation of the iTool). Thus, inside the
myPanel.pro, I can't figure out how to get hold of my list_data which
I added to oParmset.

Can anybody give a hint?

Is there some other more direct way to get the info into myPanel.pro?

Any help would be greatly appreciated,

Thanks,

Sean Dettrick
[Message index]
 
Read Message
Previous Topic: Re: Cosmetic Updates (or Acting Your Age)
Next Topic: VOXEL_PROJ

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

Current Time: Wed Oct 08 15:34:46 PDT 2025

Total time taken to generate the page: 0.00422 seconds