Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form with private datasession calls a .prg. What happens
Message
 
To
12/05/1998 10:17:57
Yogi Kim
Yogi Kim Consulting
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00097056
Message ID:
00098946
Views:
30
>Is goapp an object reference to your application or a reference to your form?
>I use a global app object for all my applications and have had problems with the datasession thing.
>
>Personally, I like Carlos' idea of passing the datasession as a parameter, although the calctax() method would work just as well as a method of the form, or as a method of an object contained within the form.

Yogi,

Yes goApp is a reference to my application object. All my forms have private data sessions and I have no trouble accessing methods at the application level. But I don't access tables or views in this case. It's only a calculation module to which I'm passing parameters and returning a value from.

As you say, the calctax() method would work just as well as a method of the form or of an object of the form. The only reason for doing so it that calctax() is called by various forms.

I have cases where I have to do record manipulation, and then I pass the datasession as a parameter, exactly as Carlos does. Take the init() of the DataEnvironment of a report. You might want to call a modal form to obtain parameters to pass to a view. Usually I create a cursor with some stuff I want to pass to the modal form and some place holders fields that will contain my view parameters. In this case I need to pass the datasession as a parameter.


José
Previous
Reply
Map
View

Click here to load this message in the networking platform