pro get_user_blocks_event,event ;------------------------------------------------------------------- ; This procedure manages events generated by the get_user_blocks GUI ;------------------------------------------------------------------- common block,sblock,eblock widget_control,event.id,GET_UVALUE=uvalue case uvalue of 'done' : begin WIDGET_CONTROL,event.top,GET_UVALUE=info WIDGET_CONTROL,info[0],GET_VALUE=sblock WIDGET_CONTROL,info[1],GET_VALUE=eblock if (sblock gt eblock) then begin response = DIALOG_MESSAGE("End block must be greater than or equal to start block",/ERROR) return endif if ((sblock lt info[2]) or (eblock gt info[3])) then begin msg = "Start and end blocks must be within file block range of "+$ strtrim(string(info[2]),2) + " - " + strtrim(string(info[3]),2) response = DIALOG_MESSAGE(msg,/ERROR) return endif WIDGET_CONTROL,event.top,/DESTROY end 'reset' : begin WIDGET_CONTROL,event.top,GET_UVALUE=info WIDGET_CONTROL,info[0],SET_VALUE=info[2] WIDGET_CONTROL,info[1],SET_VALUE=info[3] return end else: endcase return end