BUG: ResetToDefault Doesn't Work on Events and Methods in VFP 6.0ID: Q231938
|
When calling the ResetToDefault method at run-time in Visual FoxPro 6.0, the following error occurs:
This error only occurs when resetting events or methods. Resetting properties does not produce the error.Property does not have a default value.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
When calling the ResetToDefault method, it resets the property, event, or method that it is referencing back to its default value. For example, issuing the following code sets the FontBold property of the form back to the default value of False:
Thisform.ResetToDefault("FontBold")
In Visual FoxPro 6.0, setting properties back to their default works correctly but setting events and methods back to their defaults causes the error described above. Of course, properties that are not available at run-time or design-time will always return the error, as they should.
PUBLIC oform1
oform1=NEWOBJECT("form1")
oform1.Show
DEFINE CLASS form1 AS form
Caption = "Form1"
Name = "Form1"
ADD OBJECT command1 AS commandbutton WITH ;
Top = 120, ;
Left = 184, ;
Height = 27, ;
Width = 99, ;
Caption = "ResetToDefault", ;
Name = "Command1"
PROCEDURE Click
WAIT WINDOW "In the Form Click event."
ENDPROC
PROCEDURE command1.Click
Thisform.ResetToDefault("Click")
ENDPROC
ENDDEFINE
Additional query words:
Keywords : kberrmsg kbContainer kbCtrl kbOOP kbVFp600bug kbGrpFox
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 21, 1999