Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pcount()
Message
From
19/02/2003 12:09:13
 
 
To
19/02/2003 11:54:39
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00754996
Message ID:
00755012
Views:
16
This message has been marked as a message which has helped to the initial question of the thread.
I don't see a problem here. Here is code that does what I think you are describing:
o1 = crea('cls1')
o2 = crea('cls2')
o1.mymethod()
o2.mymethod()
return 
DEFINE CLASS cls1 as custom
	procedure mymethod
		lparameters tcParm
		? Program(),pcount() && this = 0
	endproc
enddef

DEFINE CLASS cls2 as cls1
	procedure mymethod
		lparameters tcParm
		?Program(),pcount() 
		dodefault(tcParm)
	endproc
enddef
I get this output in VFP8, and back to VFP5. It looks like design behavior to me. After all, you did pass parameter with the DoDefault() function.

CLS1.MYMETHOD 0
CLS2.MYMETHOD 0
CLS1.MYMETHOD 1

If you are referring to something different, please modify my code above and repost it to demonstrate.

Thanks!

>I am seeing different behavior with pcound(). If I call a method with a parameter directly all works well. If I subclass the method and put in a dodefault(), pcound() returns a 1 even though I don't pass a parameter. For example:
>
>
>this.mymethod()
>
>* mymethod
>lparameters tcParm
>? pcount() && this = 0
>
>
>this.mysubmethod()
>
>* mysubmethod
>lparameters tcParm
>dodefault(tcParm)
>
>* mymethod
>lparameters tcParm
>? pcount() && this = 1
>
>
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform