Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_CUROBJ in VFP 5.0
Message
 
To
10/05/1998 01:25:25
Mark Austen
Schooner Software Limited
Msida, Malta
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00098292
Message ID:
00098365
Views:
33
Mark,

The migration route that I am following, which was suggested by Micro Endeavors, is to have VFP run the SPRs at first so that you can maintain your FPW 2.6 code while slowly converting to VFP. The idea is to get all the code complient with VFP using an IF 'VISUAL' $ UPPER(VERSION()) where needed and then start creating your VFP Forms one at a time. In this way you don't have to try to make the switch all at once.

I had read in the Knowledge base that _CUROBJ only worked with a READ and so it wouldn't work in a FORM. Well, since this is an SPR with @...GETs and a READ I figured that _CUROBJ should work. In fact, in the debug window _CUROBJ returns the correct object number but if you try to change the object number with a _CUROBJ=n the object number will not change but the object focus will have changed somewhere internally because it will go back to the previous object which had focus.

For now I'm using a work around with KEYBOARD '{BACKTAB}' and INKEY(). I guess I'll give up on _CUROBJ and just make any screens using this system memvar the first FORMS that I build.

Thanks again for the reply,

Ed


>Ed,
>
>I don't know why M$ left CUROBJ in since it no longer works. You will need to find every occurence of CUROBJ and replace it with the correct call to SetFocus().
>
>For example, if the object you are changing the focus to has the name of txtLastFocus and it is in the same container as the object you are currently on, the issuing This.Parent.txtLastFocus.SetFocus() will set the focus to the object you want. It gets a bit more complicated if the objects are in different containers, but you see the idea.
Previous
Reply
Map
View

Click here to load this message in the networking platform