Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Child.pcount() ?
Message
 
 
À
10/07/2003 16:16:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00809000
Message ID:
00809023
Vues:
38
Nope. The only way I know of is from the child:

dodefault(t1, t2, pcount())

and have the parent accept 3 parameters. Or store the pcount() to an object property and have the parent check that value.

>I'm using VFP 7.0
>
>Is there any way that a class can determine pcount() from one of it's sub-classes?
>Currently I have to do this:
>
>class.method()
>  lparameters t1, t2
>  if pcount() = 2
>    .......
>  endif
>
>subclass.method()
>  lparameters t1, t2
>  ......
>  * dodefault( t1, t2 )         && would like to still do this
>  do case
>    case pcount() = 0
>      dodefault()
>    case pcount() = 1
>      dodefault( t1 )
>    otherwise
>      dodefault( t1, t2 )
>  endcase
>
>Would rather do this:
>
>class.method()
>  lparameters t1, t2
>  if Sub_pCount() = 2
>    .......
>  endif
>
>subclass.method()
>  lparameters t1, t2
>  ......
>  dodefault( t1, t2 )
>
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform