[Gambas-user] Object array code gives weird results

Jose J. Rodriguez joe1962 at ...626...
Fri May 26 04:53:28 CEST 2006


On 5/19/06, Jose J. Rodriguez <joe1962 at ...626...> wrote:
> On 5/19/06, Timothy Marshal-Nichols
> <timothy.marshal-nichols at ...247...> wrote:
> >
> > > -----Original Message-----
> > > From: gambas-user-admin at lists.sourceforge.net
> > > [mailto:gambas-user-admin at lists.sourceforge.net]On Behalf Of Jose J.
> > > Rodriguez
> > > Sent: Friday, 19 May 2006 00:12
> > > To: gambas-user at lists.sourceforge.net
> > > Subject: [Gambas-user] Object array code gives weird results
> > >
> > >          PartInfo.Push(vPI)
> >
> > On the above line you a pushing an object. So at the end of the loop
> > all items in the array are set to the same object.
>
> Well, it's the only way I've found so far in the docs, forums or
> examples that is similar to the user defined type arrays from VB.
>
> > To overcome the problem push the value of the object or create a new object
> > with the value you want.
>
> Sorry but, could you give an example? Not really sure how to do this.
> >


Any further help on this, please? Meanwhile, I found a workaround with
2 dimensional string arrays, but I'd really like to do it the proper
way. However, I can't delay the development of the installer much
longer, and it's sort of stuck on this problem, which applies to many
places in the code (guess I'm used to typed array structures, lol).

Regards,
Joe1962




More information about the User mailing list