[Gambas-user] Problem with array, zero object

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


No, of course I checked that :-)
Always use a GV_iNIT procedure at program-start - routine.
Any way, solved it with a local declaration, no idea why the Public 
declaration doesn't work in this single case, and will not trace that 
either.
Thank you

Am 25.02.21 um 20:41 schrieb Bruce Steers:
> i have no problems with that code, it works just fine here.
>
> is it being run before the gridview is populated?
> i could not guess, sorry
> BruceS
>
>
>
> On Thu, 25 Feb 2021 at 18:51, Dag Jarle Nerland Johansen - Gambas 
> <gambas at cd-bahia.com <mailto:gambas at cd-bahia.com>> wrote:
>
>     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 ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210225/5ab8d575/attachment.htm>


More information about the User mailing list