Re: [Vala] The name `get_values' does not exist in the context of `Gee.HashMap<string, string>'



On Wed, 2010-04-07 at 20:45 -0700, Adam B wrote:
Hello all,

valac gives me this error:

   The name `get_values' does not exist in the context of
`Gee.HashMap<string,string>'

when trying to compile code like this:

   using Gee;

    int main(string[] args)
    {
        var hm = new Gee.HashMap<string, string>();
        hm.has_key("foo");
        hm.get_values();
        return 0;
    }

//valac --pkg gee-1.0 play.vala

Any idea what I'm doing wrong?  The docs say this method exists (
http://www.valadoc.org/libvala-1.0/Vala.HashMap.get_values.html).  However,
when I look at my gee-1.0.vapi the only "get_values" call I can find is in
the MultiMap interface.  Is my file outdated?  Supposedly I have version
0.5.0-3~kkvala1 installed.  Here's a snippet of my gee-1.0.vapi:

libvala ships an internal version of libgee which is not in synced with
the upstream version. This internal version is in the Vala namespace,
and you need to do a --pkg vala-1.0 to access it.

It sounds like you're trying to use the upstream version of libgee
(--pkg gee-1.0, in the Gee namespace) with the documentation for
libvala's internal version. For documentation on gee-1.0, see
http://www.valadoc.org/gee-1.0/index.htm


    [CCode (cheader_filename = "gee.h")]
    public class HashMap<K,V> : Gee.AbstractMap<K,V> {
        public HashMap (GLib.HashFunc? key_hash_func = null, GLib.EqualFunc?
key_equal_func = null, GLib.EqualFunc? value_equal_func = null);
        public override void clear ();
        public override V @get (K key);
        public override bool has (K key, V value);
        public override bool has_key (K key);
        public override Gee.MapIterator<K,V> map_iterator ();
        public override void @set (K key, V value);
        public override bool unset (K key, out V value = null);
        public override Gee.Set<Gee.Map.Entry<K,V>> entries { owned get; }
        public GLib.EqualFunc key_equal_func { get; set; }
        public GLib.HashFunc key_hash_func { get; set; }
        public override Gee.Set<K> keys { owned get; }
        public override int size { get; }
        public GLib.EqualFunc value_equal_func { get; set; }
        public override Gee.Collection<V> values { owned get; }
    }

I'm using valac 0.8.0.  Any tips would be greatly appreciated.
- Adam
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]