Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control source depends on the _screen.ActiveForm
Message
From
11/07/2012 01:03:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01547969
Message ID:
01548135
Views:
53
>That is...weird.
>If you need to update some properties in some form then pass it as parameter to the routine.
>You can't relay on the current form (maybe only if you have SDI).

Current form may just not exist... or it may change on a whim, because of some event somewhere firing (timers, menu skipfor evaluation, anything).

In this case, if reference to it was really necessary, I'd just store a reference to the form, and then get any references to controls from it... something like
loFrm=_screen.activeform
loCtl=getpem(loFrm, "controlname")
The actual code would be at least five times longer, to include all the checks - that loFrm really is a form, that loCtl does exist, etc etc. Then these references would have to be stored into properties of the current form or some other object, and then I'd use these references as controlsources... which would still be bizarre and as flimsy as a house of credit cards.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform