Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forms & formsets
Message
From
27/03/1999 10:31:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/03/1999 13:56:30
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00202509
Message ID:
00202712
Views:
14
>>>Whats the easiest way for a program to tell the difference between a form and a formset?
>>>
>>>Thanks
>>>Ron
>>oFormset.baseclass = "Formset"
>>Cetin
>thanks, is there a way to use the type command or the vartype ?
Vartype is in VFP6 only AFAIK. Type would return "O" for both. But generally used as a safety check :
function IsObjForm_or_Formset
lparameters toSomeObject
* returns 
* 0 - Not form or formset
* 1 - Formset
* 2 - Form

if type("toSomeObject") =  "O" ;
  and !isnull(toSomeObject) ;
  and toSomeobject.baseclass$"Formset"
  return iif(  toSomeobject.baseclass == "Formset" , 1,2)
endif
return 0
But being frankly I wouldn't keep a function like this (maybe just a more generic one checking if it's Object and !isnull()).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform