I load a file with my common procedures:
Code: Select all
XIncludeFile "..\ProceduresCommon.pbi"
XIncludeFile "WindowMain.pbf"
XIncludeFile "Config.pbi"
XIncludeFile "Procedures.pbi"
Thanks,
Code: Select all
XIncludeFile "..\ProceduresCommon.pbi"
XIncludeFile "WindowMain.pbf"
XIncludeFile "Config.pbi"
XIncludeFile "Procedures.pbi"
Hi Neil. Just a stab in the dark here, but try including all the form designer files before the procedure files (PBFs before PBIs):Neil wrote:...Form Designer Declares the Procedure and so I get an error.
Code: Select all
XIncludeFile "WindowMain.pbf"
XIncludeFile "..\ProceduresCommon.pbi"
XIncludeFile "Config.pbi"
XIncludeFile "Procedures.pbi"
Hi TI-994A,TI-994A wrote:Hi Neil. Just a stab in the dark here, but try including all the form designer files before the procedure files (PBFs before PBIs):Might avert the conflict.Code: Select all
XIncludeFile "WindowMain.pbf" XIncludeFile "..\ProceduresCommon.pbi" XIncludeFile "Config.pbi" XIncludeFile "Procedures.pbi"
It seems that it could be a duplicate declaration issue; are you declaring the procedures in your include files as well?Neil wrote:...Procedure has already been declared.
I am defining the Procedure in the "common" file.TI-994A wrote:It seems that it could be a duplicate declaration issue; are you declaring the procedures in your include files as well?Neil wrote:...Procedure has already been declared.
Thank you. The issue is clearly one of duplicate declaration. Since there doesn't seem to be any option in the form designer to suppress these automatic declarations of event procedures, and it is quite tricky to remove them manually, the only solution would be to excise the declarations from the procedures files. This would be a fairly simple process if there are no inter-procedural calls. However, if there were, you'd have to re-arrange the procedures to ensure that procedures being called precede the calling procedures.Neil wrote:I am defining the Procedure in the "common" file.
The Form Designer "knows" the procedure exists as it lists it in the options...
...But then it "Declares" the procedure...
...and I get the error "procedure is already declared".
Code: Select all
Repeat
event = WaitWindowEvent()
Until event = #PB_Event_CloseWindow
Yes I know - I guess if it is possible, the best solution is for Form Designer to have a toggle to say if you want the Designer to declare Procedures.TI-994A wrote:The issue is clearly one of duplicate declaration. Since there doesn't seem to be any option in the form designer to suppress these automatic declarations of event procedures
Is that a bad thing?IdeasVacuum wrote:I think you are expecting too much of the form designer.