Re: [Vala] I'm missing Java's anonymous classes



This seems okay so far, but here comes the killer:

  public class Display : Widget {
     public Display() {
        base(relayout_imp);
     }
     private void relayout_imp() { ... }
  }

This crashes when relayout() is called because the 'relayout_imp'
argument to the constructor needs 'self' but 'self' hasn't been
initialised yet (so is NULL).

That must be a compiler error. If self is really NULL,
then even a direct call to a method from the constructor
won't work.

hand
Nor Jaidi Tuah





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