Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-26 Thread Rolf-Werner Eilert
do > > > > -- Original Message --- > From: Rolf-Werner Eilert > To: mailing list for gambas users > Sent: Wed, 22 Feb 2012 17:41:53 +0100 > Subject: [Gambas-user] String array empty after SUB (Gambas 2) > >> Now, this is a strange one :-) and I really have no idea

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread nando
-- Original Message --- From: Rolf-Werner Eilert To: mailing list for gambas users Sent: Wed, 22 Feb 2012 17:41:53 +0100 Subject: [Gambas-user] String array empty after SUB (Gambas 2) > Now, this is a strange one :-) and I really have no idea what goes wrong > here. > > I

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread Emil Lenngren
The problem is not that feld.copy does not copy the array or something like that, it really returns a NEW deep copy of the array, i.e. a new object. When you call the function by executing ldsv.ListeKundeFelder(schlyssel[ls.Index], felder) you pass the reference to a String[] you want to populate

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread Bruce Bruen
On Thu, 2012-02-23 at 09:09 +0100, Rolf-Werner Eilert wrote: > That was it, Jussi, thanks a lot! > > Here we can see what it is good for to know about OOP :-) > > Regards > > Rolf > > Am 22.02.2012 18:49, schrieb Jussi Lahtinen: > > Just quick thought... maybe this "felder = feld.Copy()" gives

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread Rolf-Werner Eilert
Am 22.02.2012 20:26, schrieb GMail: > On Wed, 2012-02-22 at 19:49 +0200, Jussi Lahtinen wrote: >> Just quick thought... maybe this "felder = feld.Copy()" gives new object >> reference feld to felder. >> And because feld is declared locally, the it is null after the sub and so >> is also felder. >>

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-23 Thread Rolf-Werner Eilert
That was it, Jussi, thanks a lot! Here we can see what it is good for to know about OOP :-) Regards Rolf Am 22.02.2012 18:49, schrieb Jussi Lahtinen: > Just quick thought... maybe this "felder = feld.Copy()" gives new object > reference feld to felder. > And because feld is declared locally, th

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-22 Thread GMail
On Wed, 2012-02-22 at 19:49 +0200, Jussi Lahtinen wrote: > Just quick thought... maybe this "felder = feld.Copy()" gives new object > reference feld to felder. > And because feld is declared locally, the it is null after the sub and so > is also felder. > > Perhaps you need to do "felder = feld.Co

Re: [Gambas-user] String array empty after SUB (Gambas 2)

2012-02-22 Thread Jussi Lahtinen
Just quick thought... maybe this "felder = feld.Copy()" gives new object reference feld to felder. And because feld is declared locally, the it is null after the sub and so is also felder. Perhaps you need to do "felder = feld.Copy()" manually with for each... Jussi On Wed, Feb 22, 2012 at 18

[Gambas-user] String array empty after SUB (Gambas 2)

2012-02-22 Thread Rolf-Werner Eilert
Now, this is a strange one :-) and I really have no idea what goes wrong here. I've got a dialog which loads a list of names. I'm keeping such SUBs that deal with files in a module called ldsv (brief for load-save). The dialog's part is simple, "ls" is the listbox: PRIVATE felder AS NEW String