Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure Hierarchy
Message
From
21/05/1997 08:01:50
 
 
To
20/05/1997 16:20:12
Bob Lucas
The WordWare Agency
Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00032985
Message ID:
00033052
Views:
38
Bob,

This is expected behavior and a really big reason why I like OOP over the old procedural approach. Once you have made a call to your global routine, that routine calls the report, and subsequent function calls are processed using the procedural hierarchy from the perspective of that global routine. I ran into the same situation in exactly the same circumstance (global reporting module) in 2.6.

With OOP and subclassing, statements like loReport.GetPend() run the way you expect (want).

Randy

>Here is an interesting problem. Here are the salient points.
>
>[1] Within a program file I have a function called GetPend.
>[2] Also within this program file is a report print routine.
>[3] The report has a call to GetPend()
>[4] One of the global procedure files (SET PROC TO...) also has a function called GetPend
>
>Now, if I run the report from the program file with
>REPORT FORM .......
>it all works fine and calls the GetPend function from the current program file.
>
>However, I have a standard Reporting form which I normally use so the user can select View, Print, print to file, change printers etc. It takes a report form as input.
>
>If I do a DO FORM Reporter WITH "" then the function that is called is the one from the global procedure file, not from the current program (that has the DO FORM in it).
>
>This seems to ignore the procedure hierarchy where the function in the current program should be in the call stack and should be called.
>
>Does anyone have any ideas why this happens and what can be done to avoid it?
>
>Bob
>
>boblucas@minerva.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform