Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling method of an application class
Message
 
 
To
25/12/2007 22:43:04
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01277450
Message ID:
01277483
Views:
25
>>>An object lives in the dasession it was created in. IOW,when you call a method of an object it will be executed in the dasession the object was created in.
>>>
>>
>>I found the cause of my problem. The form that calls the method of the application class has private datasession. So no matter what other class method it calls, the tables opened in that other class are not open in the calling form.
>>
>>This creates a problem as I now cannot move my function that opens a table (based on the parameter) to a method of the application class. Too bad. Back to the original design.
>
>Just FYI, but a function call is faster than a method call. A method to open a file does not belong in an application object, but in a data object instantiated by the form(s) (or other clients) that need that data.

Thank you, Mike.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform