Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP cannot use _curobj?
Message
From
16/07/2011 07:57:11
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01518304
Message ID:
01518349
Views:
82
>Hey, thanks Sergey! So... basically _CUROBJ is going to be read-only when run by VFP9 engine. The code I'm contending with is an old fpw26 GET stack -- no form or objects. :-(

Are you sure there is no form? I'd guess Fox wouldn't reinvent get fields straight on the screen if it could just simulate them with textboxes... so maybe there's a form behind the scenes, just like a browse is actually a grid. Besides, if you create a form, activate it, and then start issuing your GETs, they get created inside that form (with form's fonts - try that).

If this manipulation you're doing is happening inside a valid(), then you can simply return the difference between current _curobj and the value you want... say, your current _curobj=4 and you want to jump to object 2 - well, return -2.

If it's not called from a valid, your option is to run your gets inside a form. I tried that (and aha! my hunch was correct), and Fox created a pageframe with one page, then a textbox for each get field. You can traverse these textboxes, looking for a given controlsource, to get a reference to your desired textbox (object reference, not number) and setfocus to it.

p.s. haven't found how does it get out of that READ... maybe you need to visit the last textbox and then tab out of it?

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