Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child.pcount() ?
Message
 
 
To
10/07/2003 16:16:09
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00809000
Message ID:
00809023
Views:
37
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform