Re: [Vala] vala-list Digest, Vol 46, Issue 2

2011-09-05 Thread Derek Dai
I am using - cmake + pkg-config + mingw32 + vala + gtk+ win32 pre-built binaries + eclipse + cdt as development environment - cmake + nsis for packaging All these tasks are done in Ubuntu. - cmake can be installed with apt-get (powerful make file generator). - mingw32 cross toolch

[Vala] Crash when generate .gir

2012-02-21 Thread Derek Dai
; with public int e; Everything just fine. Derek Dai ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Crash when generate .gir

2012-02-22 Thread Derek Dai
{ VALUE1, VALUE2 } public class MyObj { public *int* e; } } Derek Dai On Wed, Feb 22, 2012 at 1:57 PM, Derek Dai wrote: > I try to use valac (0.12, 0.14, 0.16) to generate .gir. I found that if my > vala code look like below > > n

[Vala] Class finalizer

2012-03-07 Thread Derek Dai
Hi, In Vala, if I allocate resource in static construct block, where can I free it? Thanks. Derek Dai ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] Class finalizer

2012-03-08 Thread Derek Dai
I tried the syntax too. The same issue. But it's OK with class construct/destruct. class MyClass : Object { static string message = null; class construct { message = "Bla"; } class ~MyClass() { message = null; } } Derek Dai On Fri, Mar 9, 2012 at 5:39 AM, wrote: > Send

[Vala] GLib.TypeModule with static construct/destruct example

2012-03-11 Thread Derek Dai
Hi, I post a example about how to implement a GLib.Type.Module based plugin, which also shows how to use static construct/destruct. Feel free to modify. https://live.gnome.org/Vala/TypeModuleSample Derek Dai ___ vala-list mailing list vala-list

[Vala] How to refer current class in class method like "this" in instance method?

2012-03-14 Thread Derek Dai
s" in instance method, how can I do it? Thanks! Derek Dai ___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

Re: [Vala] How to refer current class in class method like "this" in instance method?

2012-03-14 Thread Derek Dai
Thanks Dionisi, but typeof(TypeName) only return a fixed type id, but class or type id get from an instance vary. For example void print_type_id(Object o) { message("%s, %p", o.get_type().name(), o.get_class()); } print_type_id(new Gtk.Button()); print_type_id(new Gtk.Box()); Dere

Re: [Vala] Is there any way to deserialize something into object in vala?

2012-03-23 Thread Derek Dai
valac --ccode --use-header --header test.h test.vala valac -o test test.vala ** Message: test.vala:25: Point(0x8055600)[name=p1,x=1000,y=500] ** Message: test.vala:25: Point(0x8055620)[name=p1,x=1000,y=500] Derek Dai ___ vala-list mailing list vala-list@gno

Re: [Vala] How to setup vala with gtk

2012-04-21 Thread Derek Dai
You have to set environment variable PKG_CONFIG_PATH to point to where .pc files resides. Then tell valac what packages you want to use with --pkg=. eg. valac Gtk-01 Gtk-01.vala --pkg=gtk+-2.0 Derek Dai On Sat, Apr 21, 2012 at 8:00 PM, wrote: > Send vala-list mailing list submissions

Re: [Vala] change background in gtk+ 3.0 window

2012-05-30 Thread Derek Dai
See GtkCssProvider. Derek Dai On Wed, May 30, 2012 at 8:00 PM, wrote: > Send vala-list mailing list submissions to >vala-list@gnome.org > > To subscribe or unsubscribe via the World Wide Web, visit >https://mail.gnome.org/mailman/listinfo/vala-list > or,

[Vala] GObject.get() + struct in Vala is problematic

2012-09-14 Thread Derek Dai
lor.free(), eg. ClutterColor * tmp5; tmp5 = * bg; clutter_color_free(& tmp5); This causes glibc dumpping and aborting our process. I also tried free with delete keyword, but with no luck, the generated C code simple free with g_free() g_free(bg); Derek Dai On Fri, Sep 14, 2012

Re: [Vala] GObject.get() + struct in Vala is problematic

2012-09-15 Thread Derek Dai
. If we declare bg as a ClutterColor pointer Clutter.Color * bg; Clutter.Actor actor = new Clutter.Rectangle(); actor.get("background-color", out bg); message("%d, %d, %d, %d", bg->red, bg->green, bg->blue, bg->alpha); $ valac -o test test.vala --pkg=clutter-1.0 && ./

Re: [Vala] Defining new virtual signal is possible, but overring it isn't.

2012-12-16 Thread Derek Dai
("Main"); }); foo.func(); return 0; } Derek Dai On Sun, Dec 16, 2012 at 8:00 PM, wrote: > Send vala-list mailing list submissions to > vala-list@gnome.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.gnome.org/mailman/listinf