>Hi All,
>
>Never came across this before:
>
>In the Destroy() event of a grid I have:
>
>WITH THIS
> DIME GridLayout(.ColumnCount,2)
>ENDWITH
>
>which generated a 'subscript out of range' error. In an attempt to work out what was wrong I changed this to:
>
>LOCAL NoCols
>WITH THIS
> m.NoCols = .ColumnCount
> SET STEP ON
> DIME GridLayout(m.NoCols,2)
>ENDWITH
>
>At the break the debugger shows:
>.ColumnCount = 3
>m.NoCols = 0.2
>Stepping the dimensioning line, needless to say, produces the same 'out of range' error. I've tried the same thing with a basic new form and grid and don't see this behaviour. Any clues as to what may be happening in this specific case?
Gremlins working overtime? Grid with the number of columns going through all the real numbers between original .columncount and zero during its destroy?
All the weirder, help says "The Destroy event for a container object triggers before the Destroy event for any of its contained objects; the container's Destroy event can refer to its contained objects before they are released." So, assuming the grid is a container (well, it has .addobject() and .newobject() methods), this means its destroy() should fire while the columns and their members are still intact.
Maybe the columns just shrank? :)