Does VFP6 releasse objects differently from previous versions?
I am trying to recompile my MenuLib library for VFP6 and I'm having a problem.
Since considering the problem, I have decided that I've made an OO mistake in the way the system works, but the code was sound enough in VFP3 & 5.
Every menu object has a Children property, containing the number of immediate child menu objects. When a child menu item is released, it does something in the Destroy method like:
THIS.Parent.Children = THIS.Parent.Children - 1
I am getting an error telling me that Parent is an invalid reference. If I debug, then sure enough in the watch window, THIS.Parent cannot be evaluated.
I'll probably get around this by using the RemoveObject method of the parent menu item to decrease its own Children counter, which is probably more 'right-on' OO wise.
Anyway, it's a bit weird and I would welcome any comments.