[Gambas-user] Collection puzzle.

Ron ron at ...1740...
Sat Sep 7 12:56:28 CEST 2013


It doesn't work.

I don't see them with this example.
Normally this works but not with collection inside collection...

Do you see them when you run example?

Regards,
Ron.
Op 7 sep. 2013 12:54 schreef "Benoît Minisini" <gambas at ...1...>
het volgende:
>
> Le 07/09/2013 12:48, Ron a écrit :
> > 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
>
> --> You get the keys that way. What's the problem exactly?
>
> --
> Benoît Minisini
>
>
------------------------------------------------------------------------------
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft
technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
>
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> _______________________________________________
> 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