| Hi, thanks for the speedy reply,
You will note from the following that when invoking the current form NOTHING
happens! Even though the form is dumped from cache and a new menu stack is
started.
When we invoke a form other than the current form, the form is opened and
executed.
I have attached the script on the following page and four logs after that. The
scenario under which each log was generated is:
Log Scenario
-------------------------------------------------------------------------------
1 The script opens a form that is not the current one and checks an
option that appears on that form.
2 The script opens a form that is not the current one and checks an
option that does not appear on that form.
3 The script opens the current form and checks an option that appears on
it.
3 The script opens the current form and checks an option that does not
appear on it.
Regards,
ajb
The following is trace output for the script when the form name is something
other than the current form and the option being checked is within the scope of
the '/CAPTIVE' qualifier:
![SCRIPT] Line DO Script
![SCRIPT] 0 DISK$USER:[USER.WOPA3BAI1.A1]TEMP.SCP;
!
![SCRIPT] TEMP.SCP Line 1: prompt "Enter option to check: "
![FUNC] Function: PROMPT, Cmd line: "Enter option to check: "
![SYMBOL] Symbol: "Enter option to check: ", Value: Enter option to check:
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Prompt: e
!
!
!
!
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Key Value: {CR}
![FUNC] Function: OA$FLD_DONE, Cmd line:
![SCRIPT] TEMP.SCP Line 2: .if oa$prompt_dispose eqs "0" then .exit
![SYMBOL] Symbol: OA$PROMPT_DISPOSE, Value: 2
![SYMBOL] Symbol: "0", Value: 0
![SCRIPT] IF Operation starting
![SCRIPT] .IF condition OA$PROMPT_DISPOSE EQS "0" is FALSE
![SCRIPT] Null ELSE clause detected
![SCRIPT] TEMP.SCP Line 3:
![SCRIPT] TEMP.SCP Line 4: get #t = ""
![FUNC] Function: GET, Cmd line: #t = ""
![SYMBOL] Symbol: #t = "", Value:
![SCRIPT] TEMP.SCP Line 5: get #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit"
![FUNC] Function: GET, Cmd line: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_e
! xit"
![SYMBOL] Symbol: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit", Value: <xop
! 'e', #t\oa$fld_exit
![SCRIPT] TEMP.SCP Line 6: get #t2 = "form WP /captive/once/pre='get oa$menu_rem
! ainder=#t1'"
![FUNC] Function: GET, Cmd line: #t2 = "form WP /captive/once/pre='get oa$menu
! _remainder=#t1'"
![SYMBOL] Symbol: #t2 = "form WP /captive/once/pre='get oa$menu_remainder=#t1'",
! Value: form WP /captive/once/pre='get oa$menu_remainder=#t1'
![SCRIPT] TEMP.SCP Line 7:
![SCRIPT] TEMP.SCP Line 8: get oa$function = "dump_cache " oa$form_name
![FUNC] Function: GET, Cmd line: oa$function = "dump_cache " oa$form_name
![FUNC] Function: DUMP_CACHE, Cmd line: FILEM
![SYMBOL] Symbol: oa$function = "dump_cache " oa$form_name, Value: dump_cache FI
! LEM
![SCRIPT] TEMP.SCP Line 9: oa$menu_level_push
![FUNC] Function: OA$MENU_LEVEL_PUSH, Cmd line:
![SCRIPT] TEMP.SCP Line 10: oa$fao #t2, "OA$FUNCTION", OA$FORM_NAME
![FUNC] Function: OA$FAO, Cmd line: #t2, "OA$FUNCTION", OA$FORM_NAME
![SYMBOL] Symbol: #t2, Value: form WP /captive/once/pre='get oa$menu_remainder=#
! t1'
![SYMBOL] Symbol: "OA$FUNCTION", Value: OA$FUNCTION
![SYMBOL] Symbol: OA$FORM_NAME, Value: FILEM
![FUNC] Function: FORM, Cmd line: WP /captive/once/pre='get oa$menu_remainder=
! #t1'
![FORM] Form WP dispatching, Command: /captive/once/pre='get oa$menu_remainder
! =#t1'
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![FORM] Form WP clearing
![FORM] Form WP starting
![FORM] Form WP is already opened, DSAB: 00301AF8
![FUNC] Function: OA$FORM_MENU, Cmd line: /captive/once/pre='get oa$menu_remai
! nder=#t1'
![FUNC] Function: GET, Cmd line: oa$menu_remainder=#t1
![SYMBOL] Symbol: oa$menu_remainder=#t1, Value: <xop 'e', #t\oa$fld_exit
![SYMBOL] Symbol: OA$FULL_NAME, Value: ANDREW TEST-BEESON
![PUT] Field: USER/0, Page: 1, Text: ANDREW TEST-BEESON
![SYMBOL] Symbol: OA$TITLE, Value: Digital Technical Consultant
![PUT] Field: TITLE/1, Page: 1, Text: Digital Technical Consultant
![SYMBOL] Symbol: OA$DAY, Value: Tuesday
![PUT] Field: DAY/2, Page: 1, Text: Tue
![SYMBOL] Symbol: OA$DATE_FULL, Value: 20-Apr-1993
![PUT] Field: DATE/3, Page: 1, Text: 20-Apr-1993
![SYMBOL] Symbol: OA$MAIL_COUNT_DISPLAY, Value: ( 1 new mail message )
![PUT] Field: MAIL/6, Page: 1, Text: ( 1 new mail message )
![SYMBOL] Symbol: OA$CURDWR_DISPLAY, Value: MAIN
![PUT] Field: DRAWER/7, Page: 1, Text: MAIN
![SYMBOL] Symbol: OA$CURDOC_FOLDER, Value: CUSTOMISATIONS
![PUT] Field: CURFDR/8, Page: 1, Text: CUSTOMISATIONS
![SYMBOL] Symbol: OA$CURDOC_TITLE, Value: Outstanding user issues at WOP
![PUT] Field: CURTITL/9, Page: 1, Text: Outstanding user issues at WOP
![SYMBOL] Symbol: OA$CURDOC_AUTHOR, Value: ANDREW TEST-BEESON
![PUT] Field: AUTHOR/10, Page: 1, Text: ANDREW TEST-BEESON
![SYMBOL] Symbol: OA$CURDOC_MODIFIED, Value: 19-Apr-1993 12:32pm
![PUT] Field: MODATE/11, Page: 1, Text: 19-Apr-1993 12:32pm
![SYMBOL] Symbol: OA$CURDOC_DOCNUM, Value: 000079
![PUT] Field: CURNUM/12, Page: 1, Text: 000079
![SYMBOL] Symbol: OA$CURDOC_MAIL_STATUS, Value:
![FUNC] Function: XOP, Cmd line: 'e', #t
![SYMBOL] Symbol: 'e', Value: e
![FUNC] Function: OA$FLD_EXIT, Cmd line:
![FORM] Form WP closing
![FORM] Form WP dispatched
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![SCRIPT] TEMP.SCP Line 11:
![SCRIPT] TEMP.SCP Line 12: get "Result: " #t
![FUNC] Function: GET, Cmd line: "Result: " #t
![SYMBOL] Symbol: "Result: " #t, Value: Result: OA$SCP_DISPATCH .IF OA$CURDOC_DO
! CNUM == "" THEN GET OA$DISPLAY=OA$_GBL_NODOCSEL ELSE CHECK_DISKQ
! UOTA\.IF OA$STATUS == "1" THEN DECLARE_METER #METER_NO, OA$_
! WP_EDIT\\START_METER #METER_NO\\ DO WPEDIT\\STOP_METER #METER
! _NO
![SCRIPT] TEMP.SCP Line 13: .EXIT
!
![SCRIPT] Closing Script TEMP.SCP
The following is trace output for the script when the form name is something
other than the current form and the option being checked is outside the scope
of the '/CAPTIVE' qualifier:
![SCRIPT] Line DO Script
![SCRIPT] 0 DISK$USER:[USER.WOPA3BAI1.A1]TEMP.SCP;
!
![SCRIPT] TEMP.SCP Line 1: prompt "Enter option to check: "
![FUNC] Function: PROMPT, Cmd line: "Enter option to check: "
![SYMBOL] Symbol: "Enter option to check: ", Value: Enter option to check:
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Prompt: tm
!
!
!
!
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Key Value: {CR}
![FUNC] Function: OA$FLD_DONE, Cmd line:
![SCRIPT] TEMP.SCP Line 2: .if oa$prompt_dispose eqs "0" then .exit
![SYMBOL] Symbol: OA$PROMPT_DISPOSE, Value: 2
![SYMBOL] Symbol: "0", Value: 0
![SCRIPT] IF Operation starting
![SCRIPT] .IF condition OA$PROMPT_DISPOSE EQS "0" is FALSE
![SCRIPT] Null ELSE clause detected
![SCRIPT] TEMP.SCP Line 3:
![SCRIPT] TEMP.SCP Line 4: get #t = ""
![FUNC] Function: GET, Cmd line: #t = ""
![SYMBOL] Symbol: #t = "", Value:
![SCRIPT] TEMP.SCP Line 5: get #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit"
![FUNC] Function: GET, Cmd line: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_e
! xit"
![SYMBOL] Symbol: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit", Value: <xop
! 'tm', #t\oa$fld_exit
![SCRIPT] TEMP.SCP Line 6: get #t2 = "form WP /captive/once/pre='get oa$menu_rem
! ainder=#t1'"
![FUNC] Function: GET, Cmd line: #t2 = "form WP /captive/once/pre='get oa$menu
! _remainder=#t1'"
![SYMBOL] Symbol: #t2 = "form WP /captive/once/pre='get oa$menu_remainder=#t1'",
! Value: form WP /captive/once/pre='get oa$menu_remainder=#t1'
![SCRIPT] TEMP.SCP Line 7:
![SCRIPT] TEMP.SCP Line 8: get oa$function = "dump_cache " oa$form_name
![FUNC] Function: GET, Cmd line: oa$function = "dump_cache " oa$form_name
![FUNC] Function: DUMP_CACHE, Cmd line: FILEM
![SYMBOL] Symbol: oa$function = "dump_cache " oa$form_name, Value: dump_cache FI
! LEM
![SCRIPT] TEMP.SCP Line 9: oa$menu_level_push
![FUNC] Function: OA$MENU_LEVEL_PUSH, Cmd line:
![SCRIPT] TEMP.SCP Line 10: oa$fao #t2, "OA$FUNCTION", OA$FORM_NAME
![FUNC] Function: OA$FAO, Cmd line: #t2, "OA$FUNCTION", OA$FORM_NAME
![SYMBOL] Symbol: #t2, Value: form WP /captive/once/pre='get oa$menu_remainder=#
! t1'
![SYMBOL] Symbol: "OA$FUNCTION", Value: OA$FUNCTION
![SYMBOL] Symbol: OA$FORM_NAME, Value: FILEM
![FUNC] Function: FORM, Cmd line: WP /captive/once/pre='get oa$menu_remainder=
! #t1'
![FORM] Form WP dispatching, Command: /captive/once/pre='get oa$menu_remainder
! =#t1'
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![FORM] Form WP clearing
![FORM] Form WP starting
![FORM] Form WP is already opened, DSAB: 00301AF8
![FUNC] Function: OA$FORM_MENU, Cmd line: /captive/once/pre='get oa$menu_remai
! nder=#t1'
![FUNC] Function: GET, Cmd line: oa$menu_remainder=#t1
![SYMBOL] Symbol: oa$menu_remainder=#t1, Value: <xop 'tm', #t\oa$fld_exit
![SYMBOL] Symbol: OA$FULL_NAME, Value: ANDREW TEST-BEESON
![PUT] Field: USER/0, Page: 1, Text: ANDREW TEST-BEESON
![SYMBOL] Symbol: OA$TITLE, Value: Digital Technical Consultant
![PUT] Field: TITLE/1, Page: 1, Text: Digital Technical Consultant
![SYMBOL] Symbol: OA$DAY, Value: Tuesday
![PUT] Field: DAY/2, Page: 1, Text: Tue
![SYMBOL] Symbol: OA$DATE_FULL, Value: 20-Apr-1993
![PUT] Field: DATE/3, Page: 1, Text: 20-Apr-1993
![SYMBOL] Symbol: OA$MAIL_COUNT_DISPLAY, Value: ( 1 new mail message )
![PUT] Field: MAIL/6, Page: 1, Text: ( 1 new mail message )
![SYMBOL] Symbol: OA$CURDWR_DISPLAY, Value: MAIN
![PUT] Field: DRAWER/7, Page: 1, Text: MAIN
![SYMBOL] Symbol: OA$CURDOC_FOLDER, Value: CUSTOMISATIONS
![PUT] Field: CURFDR/8, Page: 1, Text: CUSTOMISATIONS
![SYMBOL] Symbol: OA$CURDOC_TITLE, Value: Outstanding user issues at WOP
![PUT] Field: CURTITL/9, Page: 1, Text: Outstanding user issues at WOP
![SYMBOL] Symbol: OA$CURDOC_AUTHOR, Value: ANDREW TEST-BEESON
![PUT] Field: AUTHOR/10, Page: 1, Text: ANDREW TEST-BEESON
![SYMBOL] Symbol: OA$CURDOC_MODIFIED, Value: 19-Apr-1993 12:32pm
![PUT] Field: MODATE/11, Page: 1, Text: 19-Apr-1993 12:32pm
![SYMBOL] Symbol: OA$CURDOC_DOCNUM, Value: 000079
![PUT] Field: CURNUM/12, Page: 1, Text: 000079
![SYMBOL] Symbol: OA$CURDOC_MAIL_STATUS, Value:
![FUNC] Function: XOP, Cmd line: 'tm', #t
![SYMBOL] Symbol: 'tm', Value: tm
![SYMBOL] Symbol: FC1, Value:
![SYMBOL] Symbol: FC2, Value:
![SYMBOL] Symbol: FC3, Value:
![FUNC] Function: OA$FLD_EXIT, Cmd line:
![FORM] Form WP closing
![FORM] Form WP dispatched
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![SCRIPT] TEMP.SCP Line 11:
![SCRIPT] TEMP.SCP Line 12: get "Result: " #t
![FUNC] Function: GET, Cmd line: "Result: " #t
![SYMBOL] Symbol: "Result: " #t, Value: Result:
![SCRIPT] TEMP.SCP Line 13: .EXIT
The following is trace output for the script when the form name is that of the
current form and the option being checked is within the scope of the '/CAPTIVE'
qualifier:
![SCRIPT] Line DO Script
![SCRIPT] 0 DISK$USER:[USER.WOPA3BAI1.A1]TEMP.SCP;
!
![SCRIPT] TEMP.SCP Line 1: prompt "Enter option to check: "
![FUNC] Function: PROMPT, Cmd line: "Enter option to check: "
![SYMBOL] Symbol: "Enter option to check: ", Value: Enter option to check:
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Prompt: e
!
!
!
!
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Key Value: {CR}
![FUNC] Function: OA$FLD_DONE, Cmd line:
![SCRIPT] TEMP.SCP Line 2: .if oa$prompt_dispose eqs "0" then .exit
![SYMBOL] Symbol: OA$PROMPT_DISPOSE, Value: 2
![SYMBOL] Symbol: "0", Value: 0
![SCRIPT] IF Operation starting
![SCRIPT] .IF condition OA$PROMPT_DISPOSE EQS "0" is FALSE
![SCRIPT] Null ELSE clause detected
![SCRIPT] TEMP.SCP Line 3:
![SCRIPT] TEMP.SCP Line 4: get #t = ""
![FUNC] Function: GET, Cmd line: #t = ""
![SYMBOL] Symbol: #t = "", Value:
![SCRIPT] TEMP.SCP Line 5: get #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit"
![FUNC] Function: GET, Cmd line: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_e
! xit"
![SYMBOL] Symbol: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit", Value: <xop
! 'e', #t\oa$fld_exit
![SCRIPT] TEMP.SCP Line 6: get #t2 = "form !AS /captive/once/pre='get oa$menu_re
! mainder=#t1'"
![FUNC] Function: GET, Cmd line: #t2 = "form !AS /captive/once/pre='get oa$men
! u_remainder=#t1'"
![SYMBOL] Symbol: #t2 = "form !AS /captive/once/pre='get oa$menu_remainder=#t1'"
! , Value: form !AS /captive/once/pre='get oa$menu_remainder=#t1'
![SCRIPT] TEMP.SCP Line 7:
![SCRIPT] TEMP.SCP Line 8: get oa$function = "dump_cache " oa$form_name
![FUNC] Function: GET, Cmd line: oa$function = "dump_cache " oa$form_name
![FUNC] Function: DUMP_CACHE, Cmd line: FILEM
![SYMBOL] Symbol: oa$function = "dump_cache " oa$form_name, Value: dump_cache FI
! LEM
![SCRIPT] TEMP.SCP Line 9: oa$menu_level_push
![FUNC] Function: OA$MENU_LEVEL_PUSH, Cmd line:
![SCRIPT] TEMP.SCP Line 10: oa$fao #t2, "OA$FUNCTION", OA$FORM_NAME
![FUNC] Function: OA$FAO, Cmd line: #t2, "OA$FUNCTION", OA$FORM_NAME
![SYMBOL] Symbol: #t2, Value: form !AS /captive/once/pre='get oa$menu_remainder=
! #t1'
![SYMBOL] Symbol: "OA$FUNCTION", Value: OA$FUNCTION
![SYMBOL] Symbol: OA$FORM_NAME, Value: FILEM
![FUNC] Function: FORM, Cmd line: FILEM /captive/once/pre='get oa$menu_remaind
! er=#t1'
![FORM] Form FILEM dispatching, Command: /captive/once/pre='get oa$menu_remain
! der=#t1'
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![SCRIPT] TEMP.SCP Line 11:
![SCRIPT] TEMP.SCP Line 12: get "Result: " #t
![FUNC] Function: GET, Cmd line: "Result: " #t
![SYMBOL] Symbol: "Result: " #t, Value: Result:
![SCRIPT] TEMP.SCP Line 13: .EXIT
The following is trace output for the script when the form name is something
other than the current form and the option being checked is outside the scope
of the '/CAPTIVE' qualifier:
![SCRIPT] Line DO Script
![SCRIPT] 0 DISK$USER:[USER.WOPA3BAI1.A1]TEMP.SCP;
!
![SCRIPT] TEMP.SCP Line 1: prompt "Enter option to check: "
![FUNC] Function: PROMPT, Cmd line: "Enter option to check: "
![SYMBOL] Symbol: "Enter option to check: ", Value: Enter option to check:
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Prompt: tms
!
!
!
!
![FORM] Form: FILEM, Field: CHOICE/4, Page: 1, Key Value: {CR}
![FUNC] Function: OA$FLD_DONE, Cmd line:
![SCRIPT] TEMP.SCP Line 2: .if oa$prompt_dispose eqs "0" then .exit
![SYMBOL] Symbol: OA$PROMPT_DISPOSE, Value: 2
![SYMBOL] Symbol: "0", Value: 0
![SCRIPT] IF Operation starting
![SCRIPT] .IF condition OA$PROMPT_DISPOSE EQS "0" is FALSE
![SCRIPT] Null ELSE clause detected
![SCRIPT] TEMP.SCP Line 3:
![SCRIPT] TEMP.SCP Line 4: get #t = ""
![FUNC] Function: GET, Cmd line: #t = ""
![SYMBOL] Symbol: #t = "", Value:
![SCRIPT] TEMP.SCP Line 5: get #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit"
![FUNC] Function: GET, Cmd line: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_e
! xit"
![SYMBOL] Symbol: #t1 = "<xop '" oa$prompt_text "', #t\oa$fld_exit", Value: <xop
! 'tms', #t\oa$fld_exit
![SCRIPT] TEMP.SCP Line 6: get #t2 = "form !AS /captive/once/pre='get oa$menu_re
! mainder=#t1'"
![FUNC] Function: GET, Cmd line: #t2 = "form !AS /captive/once/pre='get oa$men
! u_remainder=#t1'"
![SYMBOL] Symbol: #t2 = "form !AS /captive/once/pre='get oa$menu_remainder=#t1'"
! , Value: form !AS /captive/once/pre='get oa$menu_remainder=#t1'
![SCRIPT] TEMP.SCP Line 7:
![SCRIPT] TEMP.SCP Line 8: get oa$function = "dump_cache " oa$form_name
![FUNC] Function: GET, Cmd line: oa$function = "dump_cache " oa$form_name
![FUNC] Function: DUMP_CACHE, Cmd line: FILEM
![SYMBOL] Symbol: oa$function = "dump_cache " oa$form_name, Value: dump_cache FI
! LEM
![SCRIPT] TEMP.SCP Line 9: oa$menu_level_push
![FUNC] Function: OA$MENU_LEVEL_PUSH, Cmd line:
![SCRIPT] TEMP.SCP Line 10: oa$fao #t2, "OA$FUNCTION", OA$FORM_NAME
![FUNC] Function: OA$FAO, Cmd line: #t2, "OA$FUNCTION", OA$FORM_NAME
![SYMBOL] Symbol: #t2, Value: form !AS /captive/once/pre='get oa$menu_remainder=
! #t1'
![SYMBOL] Symbol: "OA$FUNCTION", Value: OA$FUNCTION
![SYMBOL] Symbol: OA$FORM_NAME, Value: FILEM
![FUNC] Function: FORM, Cmd line: FILEM /captive/once/pre='get oa$menu_remaind
! er=#t1'
![FORM] Form FILEM dispatching, Command: /captive/once/pre='get oa$menu_remain
! der=#t1'
![FLOW] Current field index: 4. Form context follows:
![FLOW] Form Name Dsab Workspace Prior Dsab
![FLOW] FILEM 00301D28 00045F0E 00000000
!
![SCRIPT] TEMP.SCP Line 11:
![SCRIPT] TEMP.SCP Line 12: get "Result: " #t
![FUNC] Function: GET, Cmd line: "Result: " #t
![SYMBOL] Symbol: "Result: " #t, Value: Result:
![SCRIPT] TEMP.SCP Line 13: .EXIT
!
![SCRIPT] Closing Script TEMP.SCP
|