Gee HashMap containing methods as values
问题 I'm trying to fill a Libgee HashMap where each entry has a string as key, and a function as value. Is this possible? I want this sort of thing: var keybindings = new Gee.HashMap<string, function> (); keybindings.set ("<control>h", this.show_help ()); keybindings.set ("<control>q", this.explode ()); so that I can eventually do something like this: foreach (var entry in keybindings.entries) { uint key_code; Gdk.ModifierType accelerator_mods; Gtk.accelerator_parse((string) entry.key, out key