I have had some strange behavior in the procedure editor when using a procedure with multiple “mini-procedures” (e.g., functions and subroutines). The post command started to generate a “missing parameter in post” error in the following mini-procedure:
expAcceptEdits:
local typePostingif info(“activesuperobject”) <> “”
objectaction info(“activesuperobject”), “Close”
endifif flagEditType = “ADD”
typePosting = “addsave”
chosenGUIDexp = info(“guid”)
else
typePosting = “updatesave”
endifpost typePosting, “Expenses DB”, “Expense_GUID”, chosenGUIDexp, “Provider_Name”, exp_Provider
callwithin .myRoutines, expResetEdits
flagEditChanged = 1
return
However, when the procedure is changed to either of the following, the post statement works:
…
typePosting = “updatesave”
endif
callwithin .myRoutines, expPostItem, typePostingflagEditChanged = 1
returnexpPostItem:
post parameter(1), “Expenses DB”, “Expense_GUID”, chosenGUIDexp, “Provider_Name”, exp_Provider
callwithin .myRoutines, expResetEdits
return
or
…
typePosting = “updatesave”
endifcallwithin .myRoutines, expPostItem, typePosting
callwithin .myRoutines, expResetEdits
flagEditChanged = 1
returnexpPostItem:
post parameter(1), “Expenses DB”, “Expense_GUID”, chosenGUIDexp, “Provider_Name”, exp_Provider
return
The variables are all windowglobals unless they are explicitly declared as local.
I don’t have an idea why this occurs. Is this a bug?
I’d appreciate any guidance.