Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reference to an object
Message
De
07/01/2008 09:26:36
 
 
À
07/01/2008 08:05:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
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:
01279920
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
>>>
>>>Get a reference to form first, then:
>>>
>>>oForm.TimerReference...
>>>
>>>Getting reference to a form might not be easy always so passing it as a parameter or saving somewhere (or looping forms to find via some property(ies)) might be needed. _screen.ActiveForm would work if that's the active form.
>>>
>>>Cetin
>>yes, but why doesn't it work with the regular reference(eg.Form1.timer1.enadbled, or Form1.combo1.enabled )?
>>Is there any info about it somewhere?
>>
>>Tamas
>
>What is regular reference "form1"? Did you get that reference by some means? Or simply using Form's name 'form1' as reference. Latter wouldn't work and have nothing to do with a timer.
>Cetin
I meant I used the form's name as a reference.
To make it precise and concrete, I have a form named form1 and there's a timer named timer1 on it. When the form starts, it queries a lot of tables and the result is saved in an excel file.
When it's finished I make the timer enabled by a prg file.
My question is why it's worked upto now with this reference: "Form1.timer1.enadbled = .t." and why it now works with "_screen.ActiveForm.timer1.enabled = .t." when nothing has been changed.

Tamas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform