[Vala] Storing a list of delegates with targets?
- From: "marcin saepia net" <marcin saepia net>
- To: vala <vala-list gnome org>
- Subject: [Vala] Storing a list of delegates with targets?
- Date: Sun, 21 Feb 2016 00:30:05 +0100
Hello,
I am writing a program where I would like to have possibility to add
arbitrary amount of callbacks which must be delegates.
I would like to store them somewhere, and then call one after another when
it's appropriate.
My first step was
public class Test : Object {
public void delegate MyFunc();
private List<MyFunc> funcs = new List<MyFunc>();
public void add(MyFunc func) {
this.funcs.append(func);
}
}
But vala compiler complains about the fact that delegates with targets
can't be used as generics.
Is there any clear way of doing this at the moment (I am using vala 0.30).
Marcin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]