Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1943
Message
 
To
18/07/2002 15:52:09
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00680184
Message ID:
00680195
Views:
20
>I have a mapping application that has a map control on a form. Every time layers are added to the control the BeforeLayerDraw method is called. The code in that method runs just fine until I call a method that must call the BeforeLayerDraw method. When that happens I get on error on one of the object references. The error is Member Layers does not evaluate to an object. In the watch window of the debugger it shows that reference to be valid. I placed this code just before the line to see if it would stop there but that didn't seem to help.
>
>DO WHILE TYPE('this.Layers(i)') = "U"
>ENDDO
>
>What could be happening?
>
>Thanks in Advance.

If the object was NULLed, the object reference will evaluate to .NULL. (which causes your "not an object" error), however the TYPE() function will still return "O".
You might want to check like
IF TYPE('this.Layers(i)') = "O" and !ISNULL(this.Layers(i)) && this is an object
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform