Re: [Vala] (previously no subject) vala gtk bug?



Il 04/07/2012 08:14, Nor Jaidi Tuah ha scritto:
On Wed, 2012-07-04 at 05:32 +0000, Adrian Stern wrote:
Problem is when i don't do it i end up with a new window every few seconds.


Sorry, my mistake. A top level window attaches itself
somewhere and requires explicit destroy. So your code
is okay.

Perhaps a vala bug?

hand
Nor Jaidi Tuah


_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list


i'm not sure, but shouldn't you give the player pointer null? i mean:
public class MainWindow : Window {
  WebPlayer player = null;
}

Also, i think using a static main in a class isn't a good thing, write a class initializer and use an extern main method, e.g.:

public class MainWindow : Window {
  public WebPlayer () {
      change_media ();
      Timeout.add (2000, change_media);
  }
}

int main (string[] args){
    Gtk.init (ref args);

    new MainWindow ();

    Gtk.main ();

    return 0;
}



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