topstring2struct
Utilities
Return value
This function returns the string as an anonymous structure. If an
error was found then this function returns a structure with a null field.
Parameters
strVal
in
required
Examples
The code below creates a widget that uses this routine.
pro tPlot,event
widget_control,event.top,get_uvalue=field
widget_control,field,get_value=strVal
extra = stringToStructure(strVal)
plot,findgen(100),_extra=extra
wshow
return
end
pro testWid
;enter any keyword to plot and see how it works
base = widget_base(/col)
field = cw_field(base,title='test',value='ax=0',/string)
void = widget_button(base,value='plot',event_pro='tPlot')
widget_control,base,/realize,set_uvalue=field
xmanager,'testWid',base,/no_block
return
end
Version history
Version
$Id: string2struct.pro 157 2006-08-21 09:01:50Z navarro $
History
Written by:
RLK, Ronn Kling Consulting.
ronn@rlkling.com
www.rlkling.com
May, 1999
Statistics
McCabe cyclic | 2 |
McCabe essential | 1 |
McCabe modular design | 1 |