[Gambas-user] Using property on a string array

Jussi Lahtinen jussi.lahtinen at ...626...
Sun Sep 20 01:21:35 CEST 2015


Can you provide way to reproduce this problem? Like runnable project and
config for it?


Jussi

On Sat, Sep 19, 2015 at 5:30 PM, Moviga Technologies <moviga at ...3488...>
wrote:

> In MGlobal I have this:
>
>
>
>
> ----------------✂----------------✂----------------✂----------------✂----------------✂
> Private $aProfiles As New String[]
>
> For Each f In Dir(CONFIG_FOLDER, "*.conf", gb.File)
>   $aProfiles.Add(File.BaseName(f))
>   Debug "Found the profile: " & File.BaseName(f)
>   Debug $aProfiles[$aProfiles.Max]
> Next
>
> Private Function Profiles_Read() As String[]
>
>    Return $aProfiles
>
> End
>
>
> ----------------✂----------------✂----------------✂----------------✂----------------✂
>
>
> And in FQuick I do this:
>
>
>
> ----------------✂----------------✂----------------✂----------------✂----------------✂
>
> Public Sub Init()
>
> Dim s As String
>
> For Each s In MGlobal.Profiles
>    Print "Found profile: " & s
> Next
>
> End
>
>
> ----------------✂----------------✂----------------✂----------------✂----------------✂
>
> But the latter prints nothing, even though the two Debug printers show
> that I do have successfully added entries to $aProfiles...
> Is this not supposed to work?
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list