Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change to European date
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01663305
Message ID:
01663457
Views:
39
Likes (1)
>>>>>I created a custom class that in its Init() event I do all the SET commands for the data environment. This class was then added to my form class which has a private data session. This gives me one place to manage all the SET commands for a private data session.
>>>>
>>>>First, thank you. Do I understand correctly that all of your forms are based on the form that has this custom method? For example, in my app almost all forms are based on a form myform. So I could then add a custom method to this form to call in the Init of the form. Is this the approach? Otherwise, I don't understand what you mean by "a custom class that is its Init() event".
>>>
>>>I normally set all private DS settings in the Load event, Init may be too late.
>>
>>I wonder why there is no global SET DATE (or SET CURRENCY) setting that would work without code in every Load method. For example, I would be surprised if the European developers of VFP have to code it in every Load method. It probably works for them out of the box. Or is it because they buy a different version of VFP? or their settings inherits from the their Windows OS?
>
>It is because they use a form's class. They set all their settings in the Load of the base class and that's it. That's the normal practice.This is what we have here as well.

This is what I plan to do too. Most if not all of my forms are based (child classes of) on a class MyForm in MyBaseClasses.vcx. And I will put the code in the LOAD method of the MyForm all SET DATE, etc.
Thank you.
"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
Next
Reply
Map
View

Click here to load this message in the networking platform