From: Ali Sabil <ali.sa...@gmail.com>
Date: Wed, 6 Jan 2010 10:56:39 +0100
Local: Wed, Jan 6 2010 4:56 am
Subject: Re: [Vala] Vala-list Digest, Vol 26, Issue 8
On Wed, Jan 6, 2010 at 10:20 AM, golnaz nilieh <g382nil...@gmail.com> wrote: If you define dataDir as constant you don't need the constructor and >> On Wed, Jan 6, 2010 at 7:28 AM, Jan Hudec <b...@ucw.cz> wrote: >> > On Tue, January 5, 2010 13:12, Frederik wrote: >> > I have to disappoint you -- that behaviour can't change. >> > The problem is, that the while the mechanism for static constructors >> >> You have several options: >> >> - create a throw-away instance: >> >> ? static int main (string[] args) { >> > Actually, there is no need to do that -- calling typeof(Global); is >> >> - call a static initialization method: >> >> ? static int main (string[] args) { >> > This should not work. *static* methods do not cause a class to be >> >> - make 'dataDir' const, if it is not intended to change >> > - make the variable a class one instead of static one. >> > public class Global { >> To me to correct way is to use: >> Also please follow the Vala coding conventions (data_dir instead of >> -- > Thanks to all. I defined an empty constructor for Global, and called it in you don't need to call it. > But a new question: Is there a way to pass the installation path to dataDir? I already posted a message about that in this mailing list, but it > I use this macro in configure.ac: > AC_PREFIX_DEFAULT(/usr/local) > can i use it as a variable in a vala source file? seems like you are subscribing to a mail digest, it will take a while before you get it. _______________________________________________ Vala-list mailing list Vala-l...@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||