Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reference to an object
Message
From
07/01/2008 09:42:00
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
07/01/2008 09:26:36
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01279859
Message ID:
01279922
Views:
15
>>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

Tamas,
'Form1' form name is never safe to use as a form object reference. In development IDE it works, because VFP do create a public variable with the scx name of the form or the name used in name clause. That naming differ between how a form is instantiated (do form, createobject()).
I don't use SP2. Maybe in SP2 they even changed the availability of that scx name based access.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform