Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Jürg Billeter
On Mon, 2009-01-26 at 11:32 +0100, Frederik wrote: Frederik wrote: Michael 'Mickey' Lauer wrote: Hi, I'm working on my first binding for a non-gobject library -- please see gsm0710_p.h. My current vapi is also attached. I'm struggling with setting the callback pointers now. How

Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Michael 'Mickey' Lauer
Thanks for your mails, I think the VAPI part is clear to me now. Unfortunately I still can't do the actual setting of the callback. I have: === gsm0710_p.h === typedefint (*gsm0710_context_at_command_callback)(struct gsm0710_context *ctx, const char *cmd); ... struct

Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Andrea Del Signore
On Mon, 2009-01-26 at 19:15 +0100, Michael 'Mickey' Lauer wrote: Thanks for your mails, I think the VAPI part is clear to me now. Unfortunately I still can't do the actual setting of the callback. I have: === gsm0710_p.h === typedefint

Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Michael 'Mickey' Lauer
Hi, I think that the delegate should be static: [CCode (instance_pos = 0)] public static delegate int AtCommandCallback( string cmd ); Thanks, still the same error though. -- :M: ___ Vala-list mailing list Vala-list@gnome.org

Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Andrea Del Signore
On Mon, 2009-01-26 at 20:33 +0100, Michael 'Mickey' Lauer wrote: Hi, I think that the delegate should be static: [CCode (instance_pos = 0)] public static delegate int AtCommandCallback( string cmd ); Thanks, still the same error though. Yes there are some other errors there. See

Re: [Vala] Properly wrapping callbacks

2009-01-26 Thread Frederik
Michael 'Mickey' Lauer wrote: Thanks for your mails, I think the VAPI part is clear to me now. Unfortunately I still can't do the actual setting of the callback. I have: === gsm0710_p.h === typedefint (*gsm0710_context_at_command_callback)(struct

[Vala] Inverse of control in VALA?

2009-01-26 Thread Pawel Cesar Sanjuan Szklarz
Hi. Is it planed any feature to support inverse of control on VALA?? In java I found that this can be really helpfull. A good library for this on java is guice: http://code.google.com/p/google-guice/ Pawel Szklarz. ___ Vala-list mailing list

[Vala] bug in vapi

2009-01-26 Thread pancake
I noticed that property support is not affected by the cprefix CCode attribute. Here's an example: [Compact] [CCode (cname=struct r_asm_t, free_function=r_asm_free, cprefix=r_asm_)] public class State { public unowned string buf_asm;

Re: [Vala] Inverse of control in VALA?

2009-01-26 Thread christian . hergert
I agree, having types loaded at startup would make life a lot easier in most of my situations. Is this already done with types in plugins when the plugin is loaded? -- Christian ___ Vala-list mailing list Vala-list@gnome.org

[Vala] reading and writing binary data

2009-01-26 Thread jezra lickter
Hello, I am using GNet to read data from a file over http and then write the data to a local file. Everything works fine when I am reading a text file but when I read some sort of binary file the data gets corrupted. I believe the problem is caused by Vala converting the data that I read into a

Re: [Vala] reading and writing binary data

2009-01-26 Thread Yu Feng
Not sure if helpful, but apparently uchar[] stands for byte arrays, string stands for utf8 string. I believe a patch to glib-2.0.vapi should be made to include the -data member in class ByteArray. - Yu On Mon, 2009-01-26 at 18:52 -0800, jezra lickter wrote: Hello, I am using GNet to read