Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-28 Thread Jussi Lahtinen
I would guess somewhere in your code there is line, which make fntexc and fontliste to point same memory address. IE "fontliste = fntexc" or perhaps setFontNameList is called twice and that time with fntexc as parameter. Can you try to isolate the problem into small demonstration project? If that

Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-28 Thread Gianluigi
And using classes instead of the modules? See Attachment Regards Gianluigi 2016-04-28 9:00 GMT+02:00 Rolf-Werner Eilert : > > Am 27.04.2016 18:39, schrieb T Lee Davidson: > > On 04/27/2016 12:02 PM, Rolf-Werner Eilert wrote: > >> This is the code: > >> > >> Public Sub setFontNameList(fontliste As

Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-28 Thread Rolf-Werner Eilert
Am 27.04.2016 18:39, schrieb T Lee Davidson: > On 04/27/2016 12:02 PM, Rolf-Werner Eilert wrote: >> This is the code: >> >> Public Sub setFontNameList(fontliste As String[]) >> Dim i As Integer >> >> fntexc.Clear >> >> For i = 0 To fontliste.count - 1 >>fntexc.Add(fontliste[i]) >

Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-27 Thread Daniel Lemke
I ran the code and I was able to populate fntexc with the array, but I didn't see how you declared fntexc so I am unsure what the difference is between our implementations. For testing sake, I merely made fntexc a public variable . If you were to provide more of the code, it would be a lot easier

Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-27 Thread Christof Thalhofer
Hello Rolf-Werner, apart from the other ... Am 27.04.2016 um 18:02 schrieb Rolf-Werner Eilert: >For i = 0 To fontliste.count - 1 > fntexc.Add(fontliste[i]) >Next Easier would be: fntexc.Insert(fontliste) Alles Gute Christof Thalhofer -- Dies ist keine Signatur --

Re: [Gambas-user] String[] in Sub, what is going wrong

2016-04-27 Thread T Lee Davidson
On 04/27/2016 12:02 PM, Rolf-Werner Eilert wrote: > This is the code: > > Public Sub setFontNameList(fontliste As String[]) > Dim i As Integer > > fntexc.Clear > > For i = 0 To fontliste.count - 1 > fntexc.Add(fontliste[i]) > Next > > End > > It didn't run, so I set a Wait to the

[Gambas-user] String[] in Sub, what is going wrong

2016-04-27 Thread Rolf-Werner Eilert
This is the code: Public Sub setFontNameList(fontliste As String[]) Dim i As Integer fntexc.Clear For i = 0 To fontliste.count - 1 fntexc.Add(fontliste[i]) Next End It didn't run, so I set a Wait to the line fntexc.Clear. "fontliste[]" is delivered as it should, it has 3 items.