Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class Name is Invalid

Status
Not open for further replies.
Aug 1, 2018
3
AU
I had this problem then realised that my start up program was NOT set to MAIN.


I hope this will help.
 
Thanks for contributing. I see you have no question, but just a helpful tip. You can pick that as thread type when you want to post something like again.

The error you likely had was Error 1949 - literally "Class name is invalid"

It's (unfortunately) not the only error message, that can be misleading. In this case, the error description says

VFP help topic about error messages said:
The class name you have specified is not valid or does not exist.

So at least that explains why a valid class name still can lead to that error. If all compiles and works once you put back the main file, the second explanation must have been your case, more precisely, VFP didn't know where to look for the class and thus thought it doesn't exist. Some other file became main file of your project and that caused the havoc, so yes, you better have a main.prg and while you can even set a vcx as main project file it makes no sense. And that can happen, if you may just create a class lib as the only file of your project.

There have to be some more things coming together, for example, whatever became main file didn't find some parent class or another dependency as initialization is missing.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top