Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class in PRG vs class in VCX
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Class in PRG vs class in VCX
Miscellaneous
Thread ID:
01680487
Message ID:
01680487
Views:
146
Hi,

I am wondering if it is a better practice to have the class defined in a PRG file or VCX file? Note that I don't care about the speed. All I care is about how VFP uses the class. Let me explain what I mean by "uses" (because I don't know how).

In my application there is a class PASSWORD defined in a PRG file. It has several methods and a number of properties. This class is instantiated at the top of the application and the reference is a PUBLIC variable oPassword. Again, it is not important that this is a public variable. I can easily make it into a property of the application object/class. But I think, at this point, it is not important.

This class PASSWORD works for 99% of the customers without any problems. But I have a customer (I already have a couple of threads about issues the application has there) that has the following problem.

Sometimes (rare but sometimes) when a method of the class PASSWORD is used (e.g. oPassword.passcode( ### ), the program bombs with the message "cannot find the file c:\users\.......\password.fxp"
Interesting that at exactly the same time the application loses connection to the SQL Server (because I keep a log of these issues). But using the code suggested by Walter Meester, the SQL Server connection is restored ON THE FIRST trial. Which is great. But I don't know how to restore the application connection to the VM share where the application reside. Therefore, I have two questions:

1. If the class PASSWORD is refactored into a VCX file, do you think it will be more stable?
2. My understanding is that the entire application (it is about 17MB in size) is loaded into the PC memory when the application starts. Therefore, the application should not really "go back" to the VM share to get some code. Because the code is all inside the APPL.EXE file and therefore in the memory of the PC.
What then "wipes" the code from the PC memory that the application needs to "go back" to the share?

TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform