[Gambas-user] Collection puzzle.

Ron ron at ...1740...
Sat Sep 7 12:48:46 CEST 2013


Something eats my time here...

I have a collection cCol which contains collections cCol2
The keys of cCol2 are unknown because they come from a JSON.decode function.

I can't seem to access those keys, anyone has an idea on how to print them?

So in example below, the "1", "2", "6"

It seems collection implementation misses some function/method or
contains a bug.

Public Sub Main()

  Dim cCol As Collection
  Dim cCol2 As Collection
  Dim cVal As Collection

  cCol2 = ["1": "one", "2": "two", "6": "six"]
  cCol = ["A": cCol2, "B": cCol2, "C": cCol2]

  For Each cVal In cCol
    Print cVal.key
  Next

End




More information about the User mailing list