Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where to place dodefault()
Message
From
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:
01663438
Views:
50
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform