Re: [Vala] GTK and Property problems

2010-06-26 Thread pHilipp Zabel
On Sat, Jun 26, 2010 at 9:36 AM, Andrew wrote: > HI guys, > > Perhaps the simplest way to ask this is, could anyone tell me why when > the attached file (Genie) is compiled and then run, do I get these error > messages? > > (wasiliana:2710): Gtk-CRITICAL **: gtk_container_add: assertion > `GTK_IS_

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread pHilipp Zabel
2010/2/9 Jiří Zárevúcky : > pHilipp Zabel píše v Út 09. 02. 2010 v 22:05 +0100: >> 2010/2/9 Jiří Zárevúcky : >> > pHilipp Zabel píše v Út 09. 02. 2010 v 16:37 +0100: >> >> On Tue, Feb 9, 2010 at 3:53 PM, Levi Bard >> >> wrote: >> >> >>

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread pHilipp Zabel
2010/2/9 Jiří Zárevúcky : > pHilipp Zabel píše v Út 09. 02. 2010 v 16:37 +0100: >> On Tue, Feb 9, 2010 at 3:53 PM, Levi Bard >> wrote: >> >> While this is indeed correct workaround, the Hildon binding should >> >> probably be updated (so you get type-checkin

Re: [Vala] maemo5 hildon input mode

2010-02-09 Thread pHilipp Zabel
On Tue, Feb 9, 2010 at 3:53 PM, Levi Bard wrote: >> While this is indeed correct workaround, the Hildon binding should >> probably be updated (so you get type-checking from the compiler). > > In that case, can that be a different vapi so that we can still use > hildon-1 with diablo (maemo 4.x)? >

[Vala] async D-Bus methods that return arrays fail to compile

2010-01-29 Thread pHilipp Zabel
Hi, the following example program fails to compile because Vala adds the length of the int[] output array (output_length1) to the async begin function call instead of to the async finish function call. The async function itself is fine, only the D-Bus wrappers put this parameter in the wrong place

Re: [Vala] CCode array length field name

2009-11-30 Thread pHilipp Zabel
On Tue, Dec 1, 2009 at 12:59 AM, Jan-Jaap van der Geer wrote: > On Mon, 2009-11-30 at 15:09 -0800, Evan Nemerson wrote: >> On Mon, 2009-11-30 at 23:45 +0100, pHilipp Zabel wrote: > >> > [CCode (array_length = false)] will make Vala turn errmess.length into >&g

Re: [Vala] CCode array length field name

2009-11-30 Thread pHilipp Zabel
On Mon, Nov 30, 2009 at 10:19 PM, Jan-Jaap van der Geer wrote: > On Sun, 2009-11-29 at 00:38 +0100, pHilipp Zabel wrote: >> > vapi binding: >> > >> > public class SomeStruct { >> > [CCode (array_param_name?...)] // what should this be ? >&g

Re: [Vala] CCode array length field name

2009-11-28 Thread pHilipp Zabel
On Sat, Nov 28, 2009 at 11:31 PM, aaron andersen wrote: > Didn't see anything quickly browsing through the regular spots... maybe > someone here can help me out. > > Binding for a vapi. > > c struct: > > struct SomeStruct { > uint8 *data; > size_t dataLength; > }; > > vapi binding: > > public clas

Re: [Vala] How to use the ZLib bindings?

2009-11-10 Thread pHilipp Zabel
Hi Yu, On Mon, Nov 9, 2009 at 7:12 PM, Feng Yu wrote: > On Sun, Oct 4, 2009 at 7:25 AM, Philipp Zabel wrote: > >> Hi, >> >> Does anybody have example code that uses the ZLib bindings? I tried to >> implement the example described at http://zlib.net/zlib_

Re: [Vala] calling delegate from async

2009-10-24 Thread pHilipp Zabel
On Sat, Oct 24, 2009 at 4:44 PM, pHilipp Zabel wrote: > On Sat, Oct 24, 2009 at 12:59 PM, Jan Hudec wrote: >> On Fri, Oct 23, 2009 at 15:31:53 +0200, pHilipp Zabel wrote: >>> Hi, >>> >>> I'd like to call a delegate function from an async functio

Re: [Vala] calling delegate from async

2009-10-24 Thread pHilipp Zabel
On Sat, Oct 24, 2009 at 12:59 PM, Jan Hudec wrote: > On Fri, Oct 23, 2009 at 15:31:53 +0200, pHilipp Zabel wrote: >> Hi, >> >> I'd like to call a delegate function from an async function, like this: >> >> class AsyncDelegate { >>         delegate vo

[Vala] calling delegate from async

2009-10-23 Thread pHilipp Zabel
Hi, I'd like to call a delegate function from an async function, like this: class AsyncDelegate { delegate void TestFunc (); void test_func () { print ("delegate\n"); } async void test_async (TestFunc f) { print ("async enter\n");

[Vala] problems with GMarkupParser bindings

2009-10-19 Thread pHilipp Zabel
Hi, I'm trying to use the Simple XML Subset Parser, starting from the example at http://live.gnome.org/Vala/MarkupSample. The GLib.MarkupParser struct is defined as follows: unowned GLib.MarkupParser parser = { (context, element_name, attribute_names, attribute_values) =>

Re: [Vala] Interesting bug...

2009-10-18 Thread pHilipp Zabel
On Sat, Oct 17, 2009 at 3:31 PM, Magnus Therning wrote: > Here's a piece of code I'm having some problems with: > >  int main( string[] args ) { >      var res = store_password_sync( NETWORK_PASSWORD, DEFAULT, >                                     "Vala Test key", "the password", 0 ); > >      ret

[Vala] [PATCH] add bindings for g_ascii_strtoull

2009-10-13 Thread Philipp Zabel
Hi, I'm missing to_uint64 from the glib-2.0 string bindings. regards Philipp diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index eaea833..8f603f0 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -921,6 +921,8 @@ public class string { public ulong to_ulong (out weak stri

[Vala] How to use the ZLib bindings?

2009-10-04 Thread Philipp Zabel
Hi, Does anybody have example code that uses the ZLib bindings? I tried to implement the example described at http://zlib.net/zlib_how.html for inflation, but compilation failed with errors from gcc about STATUS_OK etc. symbols not being found. The following patch helped with that for some reason.

[Vala] Fwd: Hildon support in Vala for Fremantle

2009-10-02 Thread pHilipp Zabel
On Fri, Oct 2, 2009 at 1:35 AM, Andrew Flegg wrote: > On Thu, Oct 1, 2009 at 10:11, Thomas Perl wrote: >> >> I want to use Vala for a more efficient rewrite of feedhandler, and I >> would like to use some widgets from the Fremantle version of Hildon. As >> you are the maintainer of the vala packa

Re: [Vala] Impossible to subclass from gio stream classes?

2009-10-01 Thread pHilipp Zabel
On Thu, Oct 1, 2009 at 7:04 PM, Jan Hudec wrote: > On Thu, Oct 01, 2009 at 09:43:39 +0200, Xavier Bestel wrote: >> Does that mean that sbuclassing a non-Vala GObject is different from >> subclassing a Vala one ? > > Well, somewhat. For non-vala classes, you can't call non-default > constructors. T

[Vala] Impossible to subclass from gio stream classes?

2009-09-30 Thread Philipp Zabel
Hi, I'd like to subclass GLib.BufferedInputStream. Vala doesn't like the following construct: class MyStream : GLib.BufferedInputStream { MyStream (GLib.InputStream base_stream) { base (base_stream); } } $ valac mystream.vala --pkg gio-2.0 mystream.vala:3.3-3.20: error: chain up

Re: [Vala] [RFC, PATCH] add async keyword to vapigen

2009-09-25 Thread pHilipp Zabel
On Fri, Sep 25, 2009 at 9:23 AM, Jan Hudec wrote: > On Thu, Sep 24, 2009 at 22:21:36 +0200, Philipp Zabel wrote: >> Or would it be better to make the parser recognize asynchronous >> functions that don't end in _async? > > An async function can be recognized by ha

[Vala] [RFC, PATCH] add async keyword to vapigen

2009-09-24 Thread Philipp Zabel
Hi, the following patch adds support for an "async" attribute to vapigen. This can be used in metadata to fix up the binding of asynchronous methods that don't end in _async like this: diff --git a/vapi/packages/gio-2.0/gio-2.0.metadata b/vapi/packages/gio-2.0/gio-2.0.metadata index 1ca9522..e458

[Vala] RFC: hildon-1.vapi update for Maemo Fremantle

2009-09-24 Thread Philipp Zabel
Hi, I tried to update the hildon-1.vapi file to support the new widgets in Maemo Fremantle. What I did so far: - I manually patched gtk+-2.0.vapi to include the HILDON_SIZE_ constants and hildon_set_theme_size and hildon_gtk_tree_view_new_with_model methods (patch below). There's probably quite a

[Vala] telepathy-glib vapi problems

2008-01-03 Thread pHilipp Zabel
Hi, I'm new to Vala, and I'd like to have bindings for telepathy-glib. Has anybody worked on this already? I tried to make some and did not succeed because gen-introspect somehow freaks out on the telepathy-glib includes. Problem: telepathy-glib/_gen/*.h are not shielded against multiple inclusion