[Gambas-user] Using property on a string array

Moviga Technologies moviga at ...3488...
Sat Sep 19 16:30:22 CEST 2015


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?




More information about the User mailing list