In my vfp6 application, I have a single class method that takes care of firing the screens. In order to keep control of these screens (like to fire their own shutdown method), each time a new screen is launch, I am putting a reference to him in an array. But still I have some strange behavior sometimes, now I am looking it in the debugger.
1) When I first start the application, the array is created with a dimension of 1 with nothing in it (.f.)
2) When I launch the first screen, I am putting it in the array, at row 1:
nInstance = ALEN(THIS.Active_form)
THIS.Active_form[nInstance] = ALLTRIM(lFormName + ALLTRIM(STR(nInstance)))
DIMENSION THIS.Active_form[nInstance + 1]
So now I have THE NAME of the screen in the array : armclient.scx2 and nothing (.f.) in the second row.
3) I fire a second screen and go through the same code. Now I have a reference to the object screen in the array(1), the name of this second screen in array(2) and .f. in array(3)... And it goes like this forever.
How come my array doesn't contain the reference to the screen object the first time ?
Thank you especially because I am getting crazy with this
Eric