GNOME Bugzilla – Bug 599635
dict get_keys no longer compiles
Last modified: 2009-10-26 23:21:58 UTC
I am using vala from git, dated October 24, 2009. This simple example in the Genie home page http://live.gnome.org/Genie no longer compiles: [indent=4] init /* test dicts */ var d = new dict of string,string /* add or change entries with following */ d["Genie"] = "Great" d["Vala"] = "Rocks" /* access entires using d[key] */ for s in d.get_keys () print "%s => %s", s, d[s] Try to compile it: prompt> valac --pkg=gee-1.0 example.gs loops.gs:14.14-14.23: error: The name `get_keys' does not exist in the context of `Gee.HashMap<string,string>' for s in d.get_keys () ^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s)
Nicolas has posted a response to this "bug" to my blog, reproduced here: If you have updated the libgee, the bug n°1 is not a bug, but a change in the lib ! Use this: [indent=4] init /* test dicts */ var d = new dict of string,string /* add or change entries with following */ d["Genie"] = "Great" d["Vala"] = "Rocks" /* access entires using d[key] */ for s in d.keys print "%s => %s", s, d[s] ...so, Jamie, could you update the example on your Genie web page, then close this bug. Note, it follows too that "d.values" works, confirmed. Hey, I'm looking forward to when these sorts of things get frozen! Thanks. Regards, Barry Kauler
Okay, closing it.