>I create an array in my init procedure
>
>dimension a__gen10(1,2)
>
Instead, make it a property, and use it as follows:
In your Init:
this.AddProperty('a_gen10[1,1]')
DIMENSION this.a_gen10(1,2)
You can use
thisform or
thisformset if they're more appropriate. The member array is scoped to the life of the object. You can also define a member property ahead of time visually using the same type of notation in the Add New Property dialog.
>as soon as I leave init procedure and go grids interactivechange() procedure to populate the grid the array definition disappears.
>Is there a way to make array through all the procedure for a form like a variable? I am trying to populate the array in grid by increasing array size and inserting values as follows
>
>*.grid.column1.text1.interactivechange()
>with thisform
>if .first_sw = .f.
> .first_sw = .t.
> .v = .v + 1
> a__gen10(.v,1) = .g1.c1.t1.value
> a__gen10(.v,2) = .g1.c6.t6.value
>else
> dimension a__gen10(alen(a__gen10, 1) + 1, alen(a__gen10, 2)) .v = .v + 1
> a__gen10(.v,1) = .g1.c1.t1.value
> a__gen10(.v,2) = .g1.c1.t1.value
>endif
>endwith
>
>Thanks
>Nick Patel