! tasks.pvc - Task Maintenance
DEF CLASS "tasks" CREATE REQUIRED DELETE REQUIRED 
LIKE "*win/flmaint"
! 
LOCAL SCREEN_LIB$="*launch/launch.en"
LOCAL SCREEN_ID$="Trans_main"
! 
FUNCTION Button_Del()DELETE_REC
! 
END DEF
! ------------------------------------------------------------------------------
ON_CREATE:
RETURN 
! ------------------------------------------------------------------------------
ON_DELETE:
RETURN 
! ------------------------------------------------------------------------------
DELETE_REC:
LOCAL mnu_list$,mnu_fl,sav_key$
! 
OPEN (HFN,IOL=*)"*launch/menu.dat"
mnu_fl=LFO
SELECT *,REC=mnu$ FROM mnu_fl
IF mnu.trxRid$<>trxRid$ THEN CONTINUE
sav_key$=KEC(_FIL_NO)
FIND (_FIL_NO,KEY=mnu.mnutrxrid$,KNO="REFID",REC=trx$,DOM=*NEXT)
mnu_list$+=trx.trxDesc$+SEP
NEXT RECORD 
CLOSE (mnu_fl,ERR=*PROCEED); mnu_fl=0
IF mnu_list$="" THEN RETURN _obj'Button_Del(FROM "*win/flmaint")
MSGBOX "This task must be removed from the following menus prior to deletion;"+SEP+mnu_list$
FIND (_FIL_NO,KEY=sav_key$,KNO=0,DOM=*NEXT)
RETURN 0
