Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameters for INIT and LOAD
Message
De
06/08/2008 10:34:50
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01336522
Message ID:
01336881
Vues:
17
>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform