Re: [Vala] Chaining up constructors.
- From: Jürg Billeter <j bitron ch>
- To: Yu Feng <rainwoodman gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Chaining up constructors.
- Date: Sun, 23 Nov 2008 11:00:08 +0100
On Sun, 2008-11-23 at 04:53 -0500, Yu Feng wrote:
On Sun, 2008-11-23 at 10:03 +0100, Jürg Billeter wrote:
On Sun, 2008-11-23 at 00:13 -0500, Yu Feng wrote:
Both vala 0.5.1 and trunk fails to smoothly switching the parent
classes. if I have extra stuff in the creation methods.
Do you have an example or bugzilla link?
I was experiencing the problem with that piece of DOM project. this is
an abridged version:
class AAA: Object {
public AAA() {
int i = 10;
}
}
class BBB: AAA {
public int j {get; construct;}
public BBB() {
base();
j = 100;
}
}
You should use "private set" here instead of "construct" with the new
construction scheme. This shouldn't cause any issues.
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]