Re: [Vala] Dynamic arrays in Vala - example for newbie

2009-03-31 Thread Leonti Bielski
You are right, it's was a bug. Today I updated my vala to 0.6.0 and it works now. Leonti On Tue, Mar 31, 2009 at 7:18 AM, Yu Feng rainwood...@gmail.com wrote: I bet it is a bug. Yu On Tue, 2009-03-31 at 00:14 +0200, Leonti Bielski wrote: Ok, thanks for the advise then. Now I have

[Vala] Dynamic arrays in Vala - example for newbie

2009-03-30 Thread Leonti Bielski
Hello! I'm writing an application and I've come to the point where I need to use dynamic arrays. I tried Garray: GLib.Arraystring test_calls; // it's declared from the start to be global test_calls = new GLib.Arraystring(false, false, (uint)sizeof(string)); test_calls.append_val(some string);

Re: [Vala] Dynamic arrays in Vala - example for newbie

2009-03-30 Thread Feng Yu
Use string[] instead of GLib.Array The rule of thumb is to avoid GLib.Array, if possible. vala array implements a resize method. On Mon, Mar 30, 2009 at 2:46 PM, Leonti Bielski prishe...@gmail.com wrote: Hello! I'm writing an application and I've come to the point where I need to use dynamic

Re: [Vala] Dynamic arrays in Vala - example for newbie

2009-03-30 Thread Leonti Bielski
Ok, thanks for the advise then. Now I have different problem. If I do the code below inside a function, it works: /--- string[] a; a= {}; a += sometext; /- But if I do initialization outside the scope to

Re: [Vala] Dynamic arrays in Vala - example for newbie

2009-03-30 Thread Yu Feng
I bet it is a bug. Yu On Tue, 2009-03-31 at 00:14 +0200, Leonti Bielski wrote: Ok, thanks for the advise then. Now I have different problem. If I do the code below inside a function, it works: /--- string[] a; a= {}; a += sometext;