Re: [gtkmm] some easy questions from a beginner



>> Daniel Perez Alcazar <danielpa wanadoo es> writes:

 > 	1- I can't do a "pack_start" with any thing different to a
 > 	Widget object.  I want to do a pack_start(menu,false,false,0),
 > 	where "menu" is an object derived from the MenuBar class.

 It works fine here.

 > /////////////////////////// nsMenu.h ////////////////////////////
 > 
 > #include <gtk--/menubar.h>
 > #include <gtk--/menu.h>
 > 
 > class nsMenu : public Gtk::MenuBar
 > {
 > 	nsMenu::nsMenu();

 what is that supposed to do?  I suspect you want to declare a
 constructor, so the line should be:

        nsMenu();

 Since you don't have a constructor other than the default that might
 explain your other problem.

 > 	nsMenu menu();

 try with 'nsMenu menu;'

 With all due respect, grab a C++ book.

-- 
Marcelo



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