Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mysterious ControlSource
Message
De
12/02/2016 16:58:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01631406
Message ID:
01631411
Vues:
75
>>>>Hi, I have a TextBox with a ControlSource that doesn't exist - no table is open; there is no table in the DataEnvironment, Form.Load() and Form.Init() are empty, and the form is not based on any class other than "Form" itself.
>>>>
>>>>And yet, instead of getting the expected error message about the non-existant field, the data I type in mysteriously gets saved - when I get back to the form, it is right there.
>>>>
>>>>Is this something with the Registry that I didn't know about?
>>>>
>>>>I just type some text as the ControlSource; for example, "aaa".
>>>
>>>Did you try closing VFP and re-opening? If you do so, are the data you typed still there?
>>
>>Indeed, the data disappears after closing VFP.
>
>Ok, so I suspect that a private variable being created that holds your data.
>
>You can add
>
>=messagebox(vartype(aaa))
>
>in the form's Init.

I see... Thanks for your help. It's a public variable, as evidenced by DISPLAY MEMORY. I didn't know that the variables were created automagically, and the help topic for "ControlSource" doesn't mention it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform