It might due to the fact it's a reserved word.
>We we have this base class that basically implements a collection. Part of the process is to add an object to an array. This code word flawlessly on VFP6 for years.
>
>
>this.ItemCount = this.ItemCount + 1
>Dimension this.Item[this.ItemCount]
>
>Local cItemPlace
>cItemPlace = "Item[" + LTrim(Str(this.ItemCount)) + "]"
>
>this.AddObject(cItemPlace, this.ItemClassName, &tInitParameters)
>
>
>We are now preparing to upgrade our systems to VFP 9 and during the testing we get an "Object name is invalid" error on the line that adds the object. This error occurs very rare (maybe once every 10000 times that line is executed). If you retry it runs! One of the times I've seen a very weird thing in the debuger. The debuger properly showed the array containing objects and what appeared to be an object named "Item[30]" residing on the same object the array is sitting on (the code errored when it tried to add the 30th element). You can drill through the object in the debugger, but when you try to reference it as this.item[30], the element of the array is returned.
>
>Anyone ran into this?
If it's not broken, fix it until it is.
My Blog