Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form state just before and after Form.Init()
Message
From
24/12/2010 10:43:58
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
24/12/2010 05:50:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01493757
Message ID:
01493793
Views:
55
>Basically, what you can't do in the Form.Init() is opening tables, if those are required for some of the form objects (through the objects' ControlSource or RecordSource). Since the objects instantiate before the form does, Form.Init() is too late, so you have to open the tables in Form.Load(), or in the form's DataEnvironment.

If you set .bindcontrols=.f. at design time, this is no longer an issue, you can open your aliases in form.init(), and then set .bindcontrols=.t. and then they will bind.

However, that's a one-time thing, i.e. the controls won't unbind if you set form.bindcontrols=.f. again, or if you add a control at runtime and try to give it delayed binding.

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