Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DODEFAULT with parameters
Message
De
04/08/2001 02:45:48
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
01/08/2001 08:59:08
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00538014
Message ID:
00539749
Vues:
13
Keith-

>An important item that may be overlooked is that using dodefault() effectively breaks pcount().

That's interesting. I've never run up against it with PCOUNT(). I wouldn't use PARAMETERS(), of course. That _does_ break. Do you have an example for PCOUNT()? I, for example tried it with keypress in the spirit of the thread and found it *seemed* to operate fine. Here's my test:
**************************************************
*-- Class Library: 
**************************************************


**************************************************
*-- Class:        myenhancedtextbox 
*-- ParentClass:  textbox
*-- BaseClass:    textbox
*-- Time Stamp:   08/03/01 11:44:03 PM
*
DEFINE CLASS myenhancedtextbox AS textbox


	Height = 23
	Width = 100
	Name = "myenhancedtextbox"


	PROCEDURE KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl
		WAIT "In MyEnhancedTextBox BaseClass KeyPress. PARAMETERS()" + STR(PARAMETERS()) WINDOW 
		WAIT "In MyEnhancedTextBox BaseClass KeyPress. PCOUNT()" + STR(PCOUNT()) WINDOW 
	ENDPROC


ENDDEFINE
*
*-- EndDefine: myenhancedtextbox
**************************************************


**************************************************
*-- Class:        metbenhanced (c:\nec\temp.vcx)
*-- ParentClass:  myenhancedtextbox (c:\nec\temp.vcx)
*-- BaseClass:    textbox
*-- Time Stamp:   08/03/01 11:44:14 PM
*
DEFINE CLASS metbenhanced AS myenhancedtextbox


	Name = "metbenhanced"


	PROCEDURE KeyPress
		LPARAMETERS nKeyCode, nShiftAltCtrl, nMyParm
		WAIT "In METBenhanced Class KeyPress. PARAMETERS()" + STR(PARAMETERS()) WINDOW 
		WAIT "In METBenhanced Class KeyPress. PCOUNT()" + STR(PCOUNT()) WINDOW 
		DODEFAULT(1,1) && Pass Just two
		WAIT "In METBenhanced Class KeyPress. PARAMETERS()" + STR(PARAMETERS()) WINDOW 
		WAIT "In METBenhanced Class KeyPress. After DODEFAULT()" + STR(PCOUNT()) WINDOW 
	ENDPROC


ENDDEFINE
*
*-- EndDefine: metbenhanced
**************************************************


**************************************************
*-- Class:        myform (c:\nec\temp.vcx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   08/03/01 11:34:00 PM
*
DEFINE CLASS myform AS form


	DoCreate = .T.
	Caption = "Form"
	Visible = .T.
	Name = "myform"


	ADD OBJECT metbenhanced1 AS metbenhanced WITH ;
		Left = 105, ;
		Top = 72, ;
		Name = "Metbenhanced1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 106, ;
		Left = 107, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Command1", ;
		Name = "Command1"


	PROCEDURE command1.Click
		THIS.Parent.MEtbenhanced1.KeyPress(1,1,1)
	ENDPROC


ENDDEFINE
*
*-- EndDefine: myform
**************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform