;+ ;NAME: ; thm_ui_set_active_dset ;PURPOSE: ; sets active datasets in themis GUI to given tplot varnames, used in ; the call_tplot widget. ;CALLING SEQUENCE: ; ss = thm_ui_set_active_dset(active_names, state) ;INPUT: ; active_names = the tplot variable names ; state = the widget state structure for the master widget ;HISTORY: ; 22-jan-2007, jmm, jimm@ssl.berkeley.edu ; ;$LastChangedBy: kenb-mac $ ;$LastChangedDate: 2007-01-26 15:52:34 -0800 (Fri, 26 Jan 2007) $ ;$LastChangedRevision: 241 $ ;$URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/trunk/idl/themis/common/thm_ui_set_active_dset.pro $ ; ;- Function thm_ui_set_active_dset, varnames, wstate data_ss = -1 temp_names = tnames() data_ss = where_arr(temp_names, varnames) If(data_ss[0] Ne -1) Then Begin If(ptr_valid(wstate.active_vnames)) Then ptr_free, wstate.active_vnames wstate.active_vnames = ptr_new(varnames) ;Set ptrs and ids in the themis_w state thm_ui_set_state_ptrs, wstate Endif Else message, /info, 'No valid names to set' Return, data_ss End