Re: Gtk::Menu with libglademm



Hello,
> I rewrote my code to use Gtk::Builder::create_from_file() logic, but as
> result I get:
>
> BuilderError: Invalid root element: 'glade-interface'
This is probably, because your files is actually in glade format,
rather than Builder.
>
> My glade file starts like this:
>
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
And this doctype shows it quite clearly.

> Any ideas about that problem?

Actually, you should try to load your file back in glade and save it
as GtkBuilder. Just select
Save As... and in the dialog box, in the bottom left corner you will
notice 2 radoibuttons.
One says GtkBuilder, and the other Libglade. You need GtkBuilder.
Overwrite your file,
and try running your program again. If it doesn't work, then there's
something rather obscure there.
If it doesn't work, then I'd try (just in case) to change the name of
the element (both in the file and
in the code of the program, in the string you pass to
Whatever->get_widget("ElementName", mUmlEditMenu).)

Good luck.


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