Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very Scary VFP Behavior on my PC !
Message
 
To
24/01/1997 00:15:04
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00018289
Message ID:
00018303
Views:
33
>>I added a Method to the base Form class in my class library. When I ran the first form, based on this class, the error handler was called without any parameters. I soon discovered that the Error Method code and Unload Event code was switched. All code from the Error was in the Unload, and all code from the Unload was in the Error. Further investigation showed the Init and Destroy code switched. All of this was at the Form level. There was also a command button on the Form, and the Error and Click code was switched.
>
>That's interesting. What version of VFP are you using?
>
>Vlad

VFP 5.0

Looking at the .scx files, current and backup.

Record 5 of cdrpol_f.scx
Class=commandbutton
From Methods memo field:

01/23/97

PROCEDURE Error
ThisForm.Abort=.t.
clear events
wait clear
ThisForm.StatusText.Value="Cancel in progress..Please standby"
If ThisForm.StartButton.enabled=.t.
ThisForm.Shutdown
Endi
ENDPROC
PROCEDURE Click
LPARAMETERS nError, cMethod, nLine
ThisForm._common.error(nError,cMethod,nLine)

ENDPROC

From Backup tape of 01/22/97

PROCEDURE Click
ThisForm.Abort=.t.
clear events
wait clear
ThisForm.StatusText.Value="Cancel in progress..Please standby"
If ThisForm.StartButton.enabled=.t.
ThisForm.Shutdown
Endi
ENDPROC
PROCEDURE Error
LPARAMETERS nError, cMethod, nLine
ThisForm._common.error(nError,cMethod,nLine)

ENDPROC

Note: Only the procedure name was moved, the code remained in the same position.
When pressing the command button (Cancel button) the error handler was called with no parameters passed. Same thing happened in Form object record.

Any Ideas ? I'm not sure if this is VFP or Visual SourceSafe. I know that VSS adds fields to the .pjx file. I don't know if it adds fields to the .scx
Have not looked at .scx files much. I was suprised to see Procedure / end procedure code generated from my Methods.

Since I have a daily backup, it's not a big deal, just scary when your source gets scrambled. Guess I'll try some other forms, based on the same class, and see what happens.
Glenn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform