[Vala] Delegate Target lost in casting?



Dear List,

When I tried the following code, appearantly my target was lost:

class MyClass {
  public MyClass(Gdk.Window window) {
    Gdk.FilterFunc func = (Gdk.FilterFunc)this.filter;

  }
   public Gdk.FilterReturn filter(X.Event * event, Gdk.Event unused) {
    return Gdk.Filter.CONTINUE;
  }
}

in CCode, func_target is set to NULL. I thought the code meant it should be
'this'

Also, If I use an implicit cast by feeding this.filter directly

window.add_filter(filter),

the target is also lost.

Is this a known bug?

regards,

- Yu


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