[Vala] C# conditional attributes in vala?

2010-08-03 Thread Nigel Griffin
Hi, I have certain methods that I'd only like to be linked-in under certain circumstance (for performance reasons). A real world example might be a need to log messages only from debug builds. In C or C++, I could achieve this with a macro that would evaluate to a blank line when the appropri

Re: [Vala] .vala's and .h's

2010-08-03 Thread Alexander Kojevnikov
On 4 August 2010 05:59, Mikkel Kamstrup Erlandsen wrote: > On 24 July 2010 01:32, Borja Varela Brea wrote: >> It is, I want to use a function that i have in c with vala directly. ¿Exists >> any form to do that? Thanks > > You can hand craft a .vapi file for you C code and then compile you > Vala

Re: [Vala] .vala's and .h's

2010-08-03 Thread Mikkel Kamstrup Erlandsen
On 24 July 2010 01:32, Borja Varela Brea wrote: > > Hi, I want to now if is posible doing something like this: > > Archive Function.c > -- > >    int sum (int a, int b) { >       return a+b; >    } > > > Archive Function.h > --- > >    int sum (int a, int b); > > >

Re: [Vala] How I do dump elements in global namespace?

2010-08-03 Thread Phil Housley
On 3 August 2010 14:26, san hoi wrote: > Hi. > > When I read vala-tutorial, I find fellowing sentense. > > http://live.gnome.org/Vala/Tutorial#Namespaces >>If you have to reference the global namespace explicitly due to ambiguity >>you can do that with the global:: prefix. > > I often use globals(

[Vala] How I do dump elements in global namespace?

2010-08-03 Thread san hoi
Hi. When I read vala-tutorial, I find fellowing sentense. http://live.gnome.org/Vala/Tutorial#Namespaces >If you have to reference the global namespace explicitly due to ambiguity >you can do that with the global:: prefix. I often use globals() in python. How I can enumerate its in vala? Thanks

Re: [Vala] Access the "klass" parameter of a class_init() function in vala with "static construct"

2010-08-03 Thread Sébastien Wilmet
2010/8/2 Abderrahim Kitouni > > > How do I add toolbar_item_type in gtk+-2.0.vapi? I've put this inside the > > "public class Action" block: > > protected GLib.Type toolbar_item_type; > > > > But I have this error (same with public instead of protected): > > error: Access to instance member `Gtk.

[Vala] Easy concurrent programming in Vala.

2010-08-03 Thread João Nuno G . S . Carvalho
Hello, My question is: Is it possible and simple add “go rotines” and “channel” ’s from the “go language (google)” to the Vala language? This model is being spread by the GO team, has the main driver (model) that makes real simple to make multi-thread/multi-core applications in the Go language.

[Vala] Blindigs

2010-08-03 Thread Borja Varela Brea
Hi, first i will explain the situation and later my question. I create a dir in vala's directory named "Proyects", inside I have: test.vala /CFunctions -> A directory with 2 archives, Operations.c and Operations.h /Vapis -> A directory with only one archive, Operations.vapi Operation

[Vala] .vala's and .h's

2010-08-03 Thread Borja Varela Brea
Hi, I want to now if is posible doing something like this: Archive Function.c -- int sum (int a, int b) { return a+b; } Archive Function.h --- int sum (int a, int b); Archive ExampleVala.vala public static voi