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

Home » Public Forums » archive » widget-programming
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
widget-programming [message #25795] Tue, 17 July 2001 09:17
Ralf Schaa is currently offline  Ralf Schaa
Messages: 37
Registered: June 2001
Member
hi there,

i am new in idl-programming and i have the following question/problem:

the widget i try to program has to open a menu so one can choose a file to
work with; this is done with DIALOG_PICKFILE(/READ)

the source-code is below

however i am receiving this error-message:
> Expression must be a structure in this context: EVENT.
> % Execution halted at: RMT_WIDGET_EVENT 13 rmt_widget_event.pro
> % $MAIN$

and i don't know what is wrong...

any suggestions?
thanx,
ralf
------------------------------------------------------------ ----------------
---------
source:

PRO rmt_widget_event, event

WIDGET_CONTROL, GET_UVALUE = rmt_uval, event.id

CASE rmt_uval OF
"help" : labeling, 'sorry, not installed'
"menuebar" : CASE event.value OF
"File.Path" : path
"File.Exit" : WIDGET_CONTROL, event.top, /DESTROY
ENDCASE
ENDCASE
END
;
;
PRO rmt_widget

junk = {CW_PDMENU_S, flags:0, name:'' }


MenuDescRMT = [$
{CW_PDMENU_S, 1, 'File'},$
{CW_PDMENU_S, 0, 'Path'},$
{CW_PDMENU_S, 2, 'Exit'},$
{CW_PDMENU_S, 3, 'Options'},$
{CW_PDMENU_S, 0, 'Gittergroesse'},$
{CW_PDMENU_S, 0, 'Plotparameter'} $
]

;
rmt_base = WIDGET_BASE(TITLE='RMT', /COLUMN)
;
rmt_plot_base = WIDGET_BASE(TITLE='RMT-Plot', EVENT_PRO='rmt_event')
rmt_plot_draw = WIDGET_DRAW(rmt_plot_base,XSIZE=800,YSIZE=600,RETAIN=2,$
/MOTION_EVENTS, /BUTTON_EVENTS)
;
panel1 = WIDGET_BASE(rmt_base, /ROW)
pdmenu = CW_PDMENU(panel1, MenuDescRMT, /RETURN_FULL_NAME, $
FONT='9x15bold', UVALUE='menuebar')
;
WIDGET_CONTROL, rmt_base, /REALIZE
WIDGET_CONTROL, rmt_plot_base, MAP=0
WIDGET_CONTROL, rmt_plot_base, /REALIZE
WIDGET_CONTROL, rmt_plot_draw, SENSITIVE=0
;
XMANAGER, 'rmt_widget', rmt_base
;
END
;
;

PRO path

path = DIALOG_PICKFILE(/READ)

END
;
;
[Message index]
 
Read Message
Previous Topic: passing structure elements... by value?
Next Topic: Re: thinning operation

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

Current Time: Wed Oct 08 14:57:02 PDT 2025

Total time taken to generate the page: 0.00234 seconds