[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Vala] [ANNOUNCE] Vala 0.4.0 - Compiler for the GObject type system



* Jürg Billeter wrote, On 21/10/08 12:00:
> The restriction to property assignment statements has been lifted, which
> means that you can have any kind of statements in the constructors /
> creation methods. However, you should be careful not to mix the two
> construction schemes too much. If you want to use the new mechanism,
> don't use any construct properties.
>
> It's also possible to chain up to the base constructor now, similar as
> in C# and Java. This won't yet work when subclassing from C library
> classes, but I'm planning to fix that. Short example:
>
> public class Foo {
> 	public Foo () {
> 		...
> 	}
> }
>
> public class Bar : Foo {
> 	public Bar () {
> 		base ();
> 		...
> 	}
> }
>
> You can also call named constructors `base.with_foo ()' and constructors
> of the same class `this ()' or `this.with_foo ()'.
>   
Thanks Jürg, thats brilliant.

Sam





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]