[Vala] GLib warning with vala code.

2010-12-18 Thread Erick Pérez Castellanos
Hi: I'm using bind_property methods of GObject in the normal way, and I'm getting GLib warning, from the program when running, Let's say, the code works fine for me, it just bothers me to see the GLib warning every time I run the app, when really there's no need for it. I think it might becau

Re: [Vala] C Code Interface

2010-12-18 Thread Erick Pérez Castellanos
Look at this article: http://mike.trausch.us/blog/2009/02/18/vala-bindings-for-non-gobject-type-c-libraries I forgot to say this, the code I need is GObject based, is exactly code from Gtk source Code, I'm planning to use out, there's two classes Gtk widgets the use internally, I'm planning to

[Vala] AccelMap is broken

2010-12-18 Thread Damien Radtke
Every time I try calling a static method from Gtk.AccelMap, I get this error: (process:9231): GLib-CRITICAL **: g_hash_table_lookup: assertion `hash_table != NULL' failed Is there something I need to do to initialize AccelMap, or is this a bug? ___ vala

Re: [Vala] Adding defer in vala?

2010-12-18 Thread Travis Watkins
On 12/18/2010 07:06 AM, Jiří Zárevúcky wrote: pancake píše v So 18. 12. 2010 v 11:46 +0100: Go adds a new keywordnamed 'defer' that schedules the execution of a statement until a return is perfiormed. Something like.. I have to do x,y,z before leaving.. In vala we have a bit of automagic refe

[Vala] Can't debug instance members easily

2010-12-18 Thread Tristin Celestin
Suppose I have the following class that I want to debug with gdb: class Example { private int foo; private int bar; const string[] colors = {"red", "green", "blue"}; public Example() { foo = 9; bar = 18; } public int add_myself() { int result = 0;

Re: [Vala] How to write float and double values into a binary file?

2010-12-18 Thread Aleksander Wabik
>Phil Housley writes: > >> Aside: The following doesn't work: >> >> public void main() { >> float flt = 9.12f; >> var output = FileStream.open("./data.txt","w"); >> output.printf("%f", flt); >> float in_flt = 5f; >> var input = FileStream.open("./data.txt", "r"); >> i

Re: [Vala] Adding defer in vala?

2010-12-18 Thread Jiří Zárevúcky
pancake píše v So 18. 12. 2010 v 11:46 +0100: > Go adds a new keywordnamed 'defer' that schedules the execution of a > statement until a return is perfiormed. Something like.. I have to do x,y,z > before leaving.. > > In vala we have a bit of automagic reference counting which can close > filed

[Vala] Adding defer in vala?

2010-12-18 Thread pancake
Go adds a new keywordnamed 'defer' that schedules the execution of a statement until a return is perfiormed. Something like.. I have to do x,y,z before leaving.. In vala we have a bit of automagic reference counting which can close filedescriptors or destroy objects automatically. Do you think

Re: [Vala] How to write float and double values into a binary file?

2010-12-18 Thread Łukasz Pankowski
Phil Housley writes: > Aside: The following doesn't work: > > public void main() { > float flt = 9.12f; > var output = FileStream.open("./data.txt","w"); > output.printf("%f", flt); > float in_flt = 5f; > var input = FileStream.open("./data.txt", "r"); > int re

Re: [Vala] C Code Interface

2010-12-18 Thread Alexey Savartsov
On Dec 18, 2010, at 7:25 AM, Erick Pérez Castellanos wrote: > Hey List: > > I have a question, I found c code that I need to include in a Autotools > project written in vala, and be able to use the objects defined in the c code > files in vala. > Does anyone knows how to do this, or any tip or