Re: [Vala] how to call the base class constructor
- From: picca <picca synchrotron-soleil Fr>
- To: "Jared Moore" <jaredm gmx com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] how to call the base class constructor
- Date: Fri, 8 Aug 2008 15:15:21 +0200
Le Fri, 8 Aug 2008 23:03:20 +1000,
"Jared Moore" <jaredm gmx com> a écrit :
Hi,
As far as I know that's not possible at the moment in vala. The way
that objects are constructed is quite different from Java or C#.
There's some more information here [1].
Jared
[1]
http://live.gnome.org/Vala/Tutorial#head-5442d562e53d8d61dad060c5f9a2ddd561d4cf98
I already red this part ;). I solved my problem by declaring a method
in the abstract base class and using it from the child
like this
public abstract class Base {
public void init(string name);
public abstract void to_geom();
public virtual void my_base_virtual();
}
public class Child {
public Child(string name) {
this.init(name);
}
Now how can I call the Base class method in a class wo override a
method ?
public override void my_base_virtual() {
call the real Base::my_base_virtual ???
}
}
Cheers,
Frederic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]