×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Class Name is Invalid

Class Name is Invalid

Class Name is Invalid

(OP)
I had this problem then realised that my start up program was NOT set to MAIN.


I hope this will help.

RE: Class Name is Invalid

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

Quote (VFP help topic about error messages)

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
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close