Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forms & formsets
Message
De
27/03/1999 10:31:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
26/03/1999 13:56:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00202509
Message ID:
00202712
Vues:
13
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform