Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LOMESSAGE is not an object
Message
From
24/02/2004 14:38:14
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00880413
Message ID:
00880425
Views:
29
>When the compiled .exe runs, I get an error message that says:
>"LOMESSAGE is not an object" but all is well when I run it from within vfp environ (command propmt)
>
>the code is as follows and was always working till today. I've rebuilt the project to no avail. I wonder what the cause is?
>
>loMessage = newobject("Animation", "Animation.vcx", "", ; && Now use Daniel's vcx class instead
>'Saving record...', ;
>'RECORD SAVE IN PROGRESS', ;
>'fish.avi')
>set message to ' Saving record...'
>loMessage.show()
>for t= 1 to 21000000
>next
>retu


I don't know the library in question, but obviously something changed in Animation.vcx that precluded its instantiation.

You should add error checking to your code, either a Try..catch block, or at least a:
If VarType(loMessage) != "O"
   * error message here.
   Return .F.
Endif
Another tip: To create a delay is better to use the Sleep API instead of an empty loop (your For..Next example) as that one eats more processor cycles.
DECLARE Sleep IN Win32API INTEGER nMilliseconds
* Pause for N seconds
nSleepSeconds = 5
nMilliseconds = nSleepSeconds * 1000
=Sleep(nMilliSeconds)
HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform