[Gambas-user] Problem with array, zero object

Dag Jarle Nerland Johansen - Gambas gambas at cd-bahia.com
Thu Feb 25 20:47:44 CET 2021


Am 25.02.21 um 19:50 schrieb Dag Jarle Nerland Johansen - Gambas:
> Hi,
> suddenly I have a problem with an array, get "zero object"
> I want to save the layout of a Gridview.
> Here a part  of the source:
>
> /Public PRO_G_LO As New Integer[]
> /
> /PRO_G_LO.Clear//
> //For y = 0 To PRO_G.Rows.Count - 1//
> //  PRO_G_LO.Add(y)//
> //  PRO_G_LO[y] = PRO_G.Rows[y].Width//
> //Next //
> /
> Why do I get "zero object" when it comes to the line /PRO_G_LO.Clear///?
> I have used several other arrays in the program, they all works fine 
> with the .Clear statement, also the first time they are accessed. 
> Seems I must be blind...
>
> Grateful for any help!
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
Hi again,
did it like this, had errors I didn't notice because it stopped before.

/DIM xx as new integer[]  'local//
//
//  xx.Clear//
//  For y = 0 To GPRO_GV.Rows.Count - 1//
//    xx.Add(y)//
//    xx[y] = GPRO_GV.Columns[y].Width//
//  Next //
//  Settings["GV_Layout/GPRO_GV"] = xx//
/
Dag
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210225/ab5d2235/attachment.htm>


More information about the User mailing list