[Vala] Dynamic arrays in Vala - example for newbie
- From: Leonti Bielski <prishelec gmail com>
- To: Vala-list gnome org
- Subject: [Vala] Dynamic arrays in Vala - example for newbie
- Date: Mon, 30 Mar 2009 20:46:24 +0200
Hello!
I'm writing an application and I've come to the point where I need to
use dynamic arrays.
I tried Garray:
GLib.Array<string> test_calls; // it's declared from the start to be global
test_calls = new GLib.Array<string>(false, false, (uint)sizeof(string));
test_calls.append_val("some string");
debug("%s", test_calls.index(0));
It gives me segmentation fault.
How do I do this properly?
I've been searching the whole day for example in Vala and couldn't find one :(
Thanks. Leonti
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]