Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference to an object
Message
 
À
07/01/2008 07:00:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01279859
Message ID:
01279885
Vues:
12
>>>>>Hi,
>>>>>How can I reference to an object from outside the object?
>>>>>I have a form with a timer on it but when I try to enable this timer from a prg, I'm always having error 1923.
>>>>>(Interestingly enough, I've used it for some time without any problem upto now.)
>>>>>
>>>>>Thanks,
>>>>>Tamas
>>>>
>>>>The usual syntax (if the object is in Form) is FormName[.parentContainer].Object
>>>>So you could use that:
>>>>
>>>>FormName.Timer1.Enabled = .t.
>>>>
>>>
>>>I've had the same idea so far but now it won't work. I checked the existence of the form and I got the message of "Object does not exist."
>>
>>

>>IF TYPE([_screen.ActiveForm.Name]) == [C]
>> _screen.ActiveForm.Timer1.Enabled= .t.
>>ENDIF
>>

>
>Thanks, Boris it works but I have no idea what could have changed.
>I've used this code snippets for a few months and not changed anything and it ran smoothly. Why does this reference work and the old one(form1) doesn't?

Maybe you changed the Name of the form?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform