Re: [Vala] class constructor not being called
- From: Albert Hopkins <marduk letterboxes org>
- To: Jonas Kulla <nyocurio gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] class constructor not being called
- Date: Sat, 16 Mar 2013 13:18:26 -0400
On Sat, Mar 16, 2013, at 12:15 PM, Jonas Kulla wrote:
[...]
Hi,
Your function 'noop()' is declared static, hence no instance is required
to
call it.
Class constructors are called on the first construction of an instance,
ie.
when you do 'new MyClass();' .
Jonas
I'm looking to create a static class (or whatever the correct way to to
this in vala). Basically I need a class that will have all static data,
so I won't require to initialize the class. It will have some static
methods and a HashMap. I'm trying to initialize the HashMap. I thought
a class/static constructor would do the trick. Apparently this is not
the preferred method. Do you know what is?
thanks,
-a
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]