Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to place dodefault()
Message
 
 
To
15/11/2018 05:13:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01663345
Message ID:
01663440
Views:
35
Thank you for your input!

>There isn't a specific place and its place might be different per your needs.
>
>If you think of built-in events, their default code is automatically called without a DODEFAULT() -unless overridden with a NODEFAULT- and that is done after all user code at the bottom.
>
>The parent's code is code like any other and DODEFAULT() calls that code, as if you copy pasted the code at the location you call it, thus that means its location is liberal. It may be at the top, BUT in that code you might be doing things that should be run after your new code, then you run it later maybe at the bottom or in between.
>
>My 0.002 cents.
>
>>Hi,
>>
>>What is a good practice when a form is based on another form, as far as where to place the dodefault() in the child form?
>>
>>My feeling is that it should be at the top of the child form method. For example.
>>
>>Say a base form is mybaseform (in MyBaseForms.vcx). And it in the INIT method of this form there is a code.
>>
>>Then you create a new form MyChildForm based on the MyBaseForm. And it has some code in the INIT() method too. I think that in the child form INIT method the sequence should be as follows:
>>
>>
>>*-- Init method of child form
>>dodefault()  && call the code in the parent INIT method
>>*-- put the code specific to the child form INIT method
>>
>>
>>Does the above make sense or there is/are issue(s)?
>>
>>TIA
"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