Post command fails in "mini-procedure"


#1

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 typePosting

if info(“activesuperobject”) <> “”
objectaction info(“activesuperobject”), “Close”
endif

if flagEditType = “ADD”
typePosting = “addsave”
chosenGUIDexp = info(“guid”)
else
typePosting = “updatesave”
endif

post 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, typePosting

flagEditChanged = 1
return

expPostItem:
post parameter(1), “Expenses DB”, “Expense_GUID”, chosenGUIDexp, “Provider_Name”, exp_Provider
callwithin .myRoutines, expResetEdits
return

or


typePosting = “updatesave”
endif

callwithin .myRoutines, expPostItem, typePosting

callwithin .myRoutines, expResetEdits
flagEditChanged = 1
return

expPostItem:
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.