The "Out of bounds" error occurs when you haven't told Gambas how many items
the array should hold.
Just add a
$alblTime.Resize(100)
before you actually use the array.
"100" means how many labels you have. Could be also a variable, like counting
files...
Regards
Matti
Vassilis K schrieb:
> I changed it as you said :
>
> PRIVATE $alblTime AS NEW Object[]
>
> PUBLIC SUB Form_Open()
> DIM i AS Integer
> DIM rsThesi AS Result
> DIM iD AS Long
>
> MODMain.Connect()
> rsThesi = MODMain.$Con.exec("select * from egrafes where elenchosAnax =
> 0")
> FOR iD = 0 TO rsThesi!AA
> i = rsThesi!thesi
> $alblTime[i] = NEW Label(ME)
> $alblTime[i].Background = Color.Red
> NEXT
> MODMain.$Con.Commit()
> END
>
> Now I get "Out of bounds" error at line : $alblTime[i] = NEW Label(ME)
> Did I make something wrong?
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Gambas-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user