Re: [Vala] The name `get_name' does not exist in the context of `Test.A'



2008/5/14 Geert Jordaens <geert jordaens telenet be>:
Could anybody give me a hint on what's wrong with folowing code :


 using GLib;

 namespace Test {
  public class A : GLib.Object {

    public string   name    {  get; set; }

  }

  public class B : GLib.Object {

    public string name    {  get; set; }

    public void copy_name (A a)
      {
         a.get_name();
      }
  }

 }

 /usr/local/bin/valac -C  test-a.vala

 test-a.vala:16.10-16.20: error: The name `get_name' does not exist in
 the context of `Test.A'
 _______________________________________________
 Vala-list mailing list
 Vala-list gnome org
 http://mail.gnome.org/mailman/listinfo/vala-list

You have no function named get_name. to use name (through get) you
just write "a.name".



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