. > No - you maybe missed my second post on this? Your callback method is >> > > definitely not finding the correct widget to call. > > Your mygl widget is fine - you simply are not calling it. > > > You were right!
> > > Though, for the record, your GL code is wrong, too and does not draw >> what you think it draws... >> > > I made some fixing and it is working now! > > > What I suggest you do is make your MainWindow class derive for Fl_Window > - you have created a new class that holds various widgets, including an > Fl_Window. > > But if you derive from Fl_Window, and make your menu, and the "mygl" > object be children of that window, then in your callback you can get the > parent of the menu and then cast that to the appropriate type to get > mygl as a child, then all should be well. > That's what I did and it is working now! Thanks! PS: just for the record I tried what Greg told me to do and I still getting that error.. And I didn't really understand how this parent() method is suppose to work. How can I create an hierarchy of widgets? Using the children() method? Or current()->add() method? I read the manual but it is not clear to me.. > > Thank you all! > -- Att, Pedro Henrique Linhares. _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk