Re: [Vala] Extension Methods

2009-03-07 Thread Sam Danielson
2009/3/6 Uwe Strempel u.strem...@googlemail.com:
 Hi,
 yes you are right.
 C# 3.0 syntac for inner-type declaration is not the best.

 This syntax:
        public int string.count_words() {
                return this.split_set( .?).length;
        }
 might be better.
 Thanks,
 regards
 Uwe

That would be really nice for when subclassing is unavailable, like
when the object is returned by an external library. I've been editing
the vapi file to add convenience methods to Sqlite.Statement. I
suppose you could do the same with the glib-2.0.vapi. Without the
ability to patch static methods we are encouraged to hack the vapi's,
which hurts standardization. All for the love of syntax sugar :).

-Sam Danielson
___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Added kill and pid_t to posix.vapi

2009-03-07 Thread Jürg Billeter
On Thu, 2009-03-05 at 17:17 -0500, Yu Feng wrote:
 Curious:
 
 What does rank mean?

The compiler uses the rank of integer types to determine what implicit
casts should be allowed. The larger the range on common platforms, the
higher the rank in the bindings.

Jürg

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Added kill and pid_t to posix.vapi

2009-03-07 Thread Jürg Billeter
On Fri, 2009-03-06 at 10:06 +0700, Hans Baier wrote:
 2009/3/6 Michael 'Mickey' Lauer mic...@vanille-media.de:
  Added the IntegerType descriptor. Can we apply the attached patch then?
 
 
 Maybe you could consider altering glib.vapi too,
 because there, Pid is defined as:

GPid is a pointer, not an integer, on Windows according to GLib
documentation, so we should not bind it as an integer type.

Jürg


___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Added kill and pid_t to posix.vapi

2009-03-07 Thread alpha alpha

Hi everyone

Could anyone please code a little example regarding GSL shaders integration in 
VALA ?
In
the clutter 8.0.8 (the c version) there is a shader example
(test_shader.c and test_shader.sh) which works fine but unfortunately
this example wasn't included in the smaller list of VALA examples. This
would be really useful for the VALA community to have a small GLSL
sample in VALA : for example a window and the entire content of the
window displays the result of a small GLSL fragment shader.

I
did try to code it in VALA using the Gl.vapi until I realized the
shader bindings are not included in the Gl.vapi. So I guess only
Clutter offers GLSL bindings for VALA coders at the moment.

Cheers
Godwin

 From: j...@bitron.ch
 To: hansfba...@googlemail.com
 Date: Sat, 7 Mar 2009 22:30:58 +0100
 CC: Vala-list@gnome.org
 Subject: Re: [Vala] Added kill and pid_t to posix.vapi
 
 On Fri, 2009-03-06 at 10:06 +0700, Hans Baier wrote:
  2009/3/6 Michael 'Mickey' Lauer mic...@vanille-media.de:
   Added the IntegerType descriptor. Can we apply the attached patch then?
  
  
  Maybe you could consider altering glib.vapi too,
  because there, Pid is defined as:
 
 GPid is a pointer, not an integer, on Windows according to GLib
 documentation, so we should not bind it as an integer type.
 
 Jürg
 
 
 ___
 Vala-list mailing list
 Vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

_
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger  !  
Téléchargez-le maintenant ! 
http://www.windowslive.fr/messenger/1.asp___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala/DBus with dict object

2009-03-07 Thread Jürg Billeter
On Thu, 2009-02-19 at 10:49 -0300, Marcelo Boveto Shima wrote:
 But no luck yet. Now it is segfaulting at OpenSessionWithParameters
 call.
 I am using vala 0.5.6.
 am I missing something else?

The dynamic D-Bus client support still uses dbus-glib based marshalling,
which doesn't support arrays of structs. Static D-Bus client supports
this with vala master. The marshalling code for dynamic D-Bus clients
will be ported to the same code static D-Bus clients are already using.

Code snippet explaining how to use static D-Bus client support here:

[DBus (name = org.freedesktop.ConsoleKit.Manager)]
public interface ConsoleKit.Manager : DBus.Object {
public abstract string open_session_with_parameters (Test[] parameters);
}

[...]

this.ckmanager = (ConsoleKit.Manager) conn.get_object
(org.freedesktop.ConsoleKit, /org/freedesktop/ConsoleKit/Manager);

Jürg

___
Vala-list mailing list
Vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list