Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a VFP function to...
Message
From
28/06/2006 11:01:37
 
 
To
28/06/2006 09:35:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01132372
Message ID:
01132429
Views:
13
I think I found a way to do it by creating a function called OBJTYPE() using TRY...CATCH:

FUNCTION OBJTYPE
LPARAMETERS tcControlSource
LOCAL lnSelect, lcRetVal
lnSelect = SELECT()
lcRetVal = ''
IF VARTYPE(tcControlSource) # 'C' .OR. EMPTY(tcControlSource) .OR. VARTYPE(&tcControlSource) = 'U'
RETURN lcRetVal
ENDIF
TRY
SELECT (tcControlSource)
lcRetVal = 'C'
CATCH
lcRetVal = 'M'
ENDTRY
SELECT (lnSelect)
RETURN lcRetVal


Sorry about the formatting, but I prefaced the code inside the IF statement with four spaces but for some reason they were deleted before the message is sent...

Thanks!
Jim
Time is a wonderful teacher. Unfortunately it kills all of its students.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform