Re: [Vala] contructor



construct is a keyword in vala for code that will be run on the class
construction.

If you rename your function to construct_database(...) does it work?

class xml_parser {

       private database db;

       public void construct_database (database db) {
               this.db = db;
       }
}

or probably set_database(database db) would be more common.

dru

2011/1/4 Pavol Klačanský <pavol klacansky com>:
but this works, I think it has something to do with "construct"


class xml_parser {

private database db;

       public void xml_parser (database db) {
               this.db = db;
       }

V Utorok, 4. január 2011 o 16:17 +0100, Dr. Michael Lauer napísal(a):
Welcome to the wonderful world of conflicting C-names.

Try naming your class XmlParser (which looks better to me
anyways...)

:M:

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


_______________________________________________
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]