;+ ; Project : SOHO - CDS ; ; Name : XMANAGER_RESET ; ; Purpose : Reset XMANAGER after a widget application crashes ; ; Category : widgets ; ; Explanation : Useful to restart XMANAGER after a widget application ; crashes and restarting the application fails. ; Call this immediately after the first XMANAGER call ; ; Syntax : IDL> xmanager_reset ; ; Examples : ; ; Inputs : None. ; ; Opt. Inputs : None. ; ; Outputs : None. ; ; Opt. Outputs: None. ; ; Keywords : GROUP = widget group leader ; MODAL = if widget was called with MODAL ; JUST_REG = if widget is just being registered ; ; Common : None. ; ; Restrictions: None. ; ; Side effects: None. ; ; History : Version 1, 17-May-1997, D M Zarro. Written ; ; Contact : DZARRO@SOLAR.STANFORD.EDU ;- pro xmanager_reset,base,group=group,just_reg=just_reg,modal=modal ;-- don't reset if just registering or calling from another widget app modal=keyword_set(modal) if modal then xshow,base else begin if xalive(base) then xshow,base else xshow,group endelse if xalive(group) then return if keyword_set(just_reg) then return ;-- only reset if current app is called standalone or modal or previous ; call to XMANAGER failed and app fails to restart if xalive(base) then begin caller=get_caller(prev=prev) dprint,'% fell thru to XMANAGER_RESET' dprint,'caller,prev: ',caller,' , ',prev if prev eq '' then reset=1 else reset=modal if reset then begin dprint,'%resetting XMANAGER...' xmanager endif endif return & end