Re: [Vala] [OT] indentation config for vim/emacs

2009-02-26 Thread Xavier Bestel
On Thu, 2009-02-26 at 09:30 +0100, Xavier Bestel wrote: On Wed, 2009-02-25 at 21:50 +0100, Stian Selnes wrote: Google didn't help me either, so I ended up writing some code for Emacs that enables indentation and line continuation the way I want it to. If I understand you correctly this

Re: [Vala] Confused with constructors

2009-02-26 Thread Sam Danielson
Thanks for the reply. I found the thread you started in Nov. 2008 to be of some help too. http://mail.gnome.org/archives/vala-list/2008-November/msg00113.html On Wed, Feb 25, 2009 at 2:30 PM, Feng Yu rainwood...@gmail.com wrote: On Sun, Feb 22, 2009 at 2:02 PM, Sam Danielson

Re: [Vala] Ellipsis syntax (Was: Ellipsis as an argument..)

2009-02-26 Thread Shawn Ferris
On Tue, 2009-02-24 at 22:43 +0100, Didier Ptitjes wrote: Hello Shawn! Hello.. pleased to meet you! public static void foo(params string[] args) { // ... } So if your arguments can be subclasses of GObject, you could use params Object[] args. You know.. that's what I thought

Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Christian Hergert
I wrote a datamapper (rather than an ORM) a while back in Vala. I don't think anyone is really using it, but it might be an example for various problems or questions you run into. http://git.dronelabs.com/git?p=users/chris/godm.git;a=summary It does let you do some neat stuff (and creates

Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Thomas Chust
2009-02-27 Sam Danielson samdaniel...@gmail.com: [...] Ideally I would think a Factory T should be able to return new T's but I can't figure out how to do this. [...] Hello, as far as I know, the Vala compiler performs type erasure for generic types. This means that the concrete type

Re: [Vala] Generics: constraints and 'new T ()' on type parameters?

2009-02-26 Thread Yu Feng
Hi Sam, On Thu, 2009-02-26 at 19:52 -0500, Sam Danielson wrote: I'm writing some ORM where a database view is wrapped in a factory object that produces records. Ideally I would think a Factory T should be able to return new T's but I can't figure out how to do this. The work around is to

Re: [Vala] Ellipsis syntax (Was: Ellipsis as an argument..)

2009-02-26 Thread Yu Feng
Hi, On Tue, 2009-02-24 at 22:43 +0100, Didier Ptitjes wrote: I asked the same to Jürg on the channel, and it appears there is only for now a syntax for typed ellipsis. The following is an example of the syntax : public static void foo(params string[] args) { // ... } So