>This is a repost
>
>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 calls 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. The reference still seems to be vaild.
>
>IF TYPE('this.layers(i)') = "O" and !ISNULL(this.layers(i)) then
> this.layers(i).visible = .t.
>ENDIF
>
>After I hit cancel in the debugger the method keeps running until it prints out the report that it is supposed to.
>
>What could be happening?
>
>Thanks in Advance
Quinn,
Would it error with :
this.layers.Item(i) ?
As I remember BeforeLayerDraw was problematic.
Cetin