Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters for INIT and LOAD
Message
From
06/08/2008 10:34:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01336522
Message ID:
01336881
Views:
16
>>I have SQL in the LOAD, but I need it to use the parameter sent to the form's INIT, but it is not available there. I could move the SQL to the INIT, but isn't that the point of the LOAD event?
>>
>>Well, if you make the parameter a property of the calling form, there is a little trick you can use because in the load of the child form, _Screen.activeform is still the calling form. So code like this could do it for you:
>>
>>
>>tuParameter = _Screen.ActiveForm.ParameterProperty
>>
>
>Interesting. I didn't know you could do that. I never would (blows OOP principles all to hell) but it's interesting to know that you can.

Well it also blows OOP principles to be unable to pass a parameter to the constructor - which .load() is; .init() actually fires at the end of construction of the object.

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