Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_CUROBJ and valids
Message
From
10/04/1998 10:01:41
 
 
To
09/04/1998 16:13:43
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00090899
Message ID:
00091032
Views:
31
>I looked up OBJNUM() and _CUROBJ and I had the syntax right, it just didn't work. Here's an example of my code:
>
>@ 3,29 GET staff.number ;
> SIZE 1.000,13.167 ;
> VALID valstaf() error errmess
>
>READ valid valme()
>
>procedure valstaf
>ret = .t.
>getno = _CUROBJ
>if ";"$staff.number
> errmess="Person's # may not contain semi-colon(;)"
> ret = .f.
>endif
>return ret
>
>procedure valme
>ret = .t.
>if "" = trim(staff.number) .and. fromhere <> 2
> errmess="Person's # may not be blank"
> ret=.f.
> wait window errmess nowait
> _CUROBJ = getno
>else
> ret = .t.
> if (""= trim(staff.number) .or. isnew) .and. fromhere = 2
> delete
> endif
>endif
>return ret


OK....now it becomes clearer. If you want the cursor to return to a given field, I *think* the syntax is _CUROBJ = OBJVAR(fieldvar), then issue a SHOW GETS. Again I do not have access to FPW documentation so this is a guess but try it out and let me know.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform