Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass parameters to subclassed form
Message
From
15/11/2006 23:23:54
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01170136
Message ID:
01170146
Views:
14
>I've created a simple form class. I would like the init of the class to do certain tasks. I also need to pass the form parameters. If I put a "parameters" statement in my form init the form class init doesn't run. So I need to include a dodefault in the form init. I don't like having to include dodefault in the form init each time I make a form. Is there any way around this?

No.

Actually yes... but you won't like it, because it's a remedy worse than the disease: repeat all the parent class code.

A better way would be to provide a hook method in your parent class, which is the general approach to solving things like this. Unfortunately, if the number of parameters your form receives is different from the number of parameters in the parent class's init method, you'd still have to accommodate that somehow - and we're back at doing a dodefault().

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform