[Gambas-user] Object-Arrays

Dag-Jarle Johansen dag.jarle.johansen at ...626...
Sat Dec 25 17:20:13 CET 2010


Hello,

first of all Merry Christmas to everyone.

It has been a pretty long time since I have done something with Gambas, and
now I have a problem with the right usage of objects.

Aim is to create a Image dynamicly in runtime, each new Image in an array so
it will be easy too handle.

I started on this way.

Private NP as new Image[]
Private PicNr as integer

in some sub

PicNr=PicNr+1
NP= New Image[PicNr]

what somehow works. But how do I refer to the new image? For me it would
have been logical to use NP[PicNr] = New Image(Parent), and refer directly
with a value of PicNr, but in all samples I have seen it is needed to loop
through the array to find the item in question.

Do anyone have a working sample for me, using dynamicly built objects?

Thanks for any help,
regards,
Dag-Jarle



More information about the User mailing list