Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class name is invalid
Message
From
29/07/2011 19:50:54
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Miscellaneous
Thread ID:
01519551
Message ID:
01519663
Views:
44
>>Hello, VFP experts!
>>
>>I got this error message when I tried to run the .EXE file I built. "Class name is invalid." There was no error during or after
>> compilation. I have included the classes I am using in the same folder and also set them as default in the
>> "Tools/Options/Controls".
>>
>>I use the same method in other projects and they worked well. Does this mean that I have accidentally use a class that is
>> not in the same folder? or maybe some other reason.
>>
>>Kindly help me. Thank you in advance.
>>
>>Maybelle
>
>This may mean that some form became corrupted or a library became corrupted. Try compiling each form from the project and each library from the project.

One other thing you may want to check for -- make sure upper-ASCII characters (e.g. accented characters, specifically anything with ASCII value higher than 127), not just for identifiers, but even in string literals. I've run into this problem before where it compiles OK and runs OK in English system, but crashes in Chinese, Japanese or Korean. I've also had code that was written on Chinese, Japanese or Korea system that compiles and runs fine on those systems, but aborts with weird errors in English. Upper-ASCII characters are often "shift-in" and "shift-out" characters in double-byte systems (e.g. in Asian languages like Chinese, Japanese, Korean). Basically you end up with programs that work fine in English language environment, but start abortting with all sorts of weird errors in Asian language environment. In string literals what could happen is the ending string delimiter gets "eaten" (because the character preceding it was interpreted as a lead-in character for a two-byte symbol) -- thus resulting in weird problems such as non-terminated strings, or even worse, following code being incorporated into string, so you may end up with "missing code" on execution along with garbled string literal. I've seen it happen (though less frequently) on code that was written in Asian-language platform which used Asian-language text. On a few occasions I've seen situation where in non-double-byte environment, interpretation of characters could terminate unexpectedly, so you end up with "garbage" characters in your code resulting in various errors. In short, stick to only alpha (English), digits and underscores for variable names, avoid string literals with upper-ASCII characters (if you need to have these characters, you can use CHR() function to construct the string -- in this case I haven't seen the problem).
Previous
Reply
Map
View

Click here to load this message in the networking platform