[Glade-users] why using libglade is better...
Neil Zanella
Neil Zanella <nzanella@gmail.com>
Mon, 18 Oct 2004 12:44:54 -0600
> You don't actually need to put them into a separate file to be able to
> recreate them. What I do is put them all in the same file, and only load
> the widget (the main app window, a dialog window, etc.) that I need,
> using the root argument to glade_xml_new().
>
> The documentation for glade_xml_new() says, "Note also that the XML
> parse tree is cached to speed up creating another GladeXML object for
> the same file", so it shouldn't actually have to reload the glade file
> for every popup. It certainly seems to me that the startup (when it loads
> the main app window from the glade file) is quite a bit slower than the
> popup creation, although I haven't profiled it.
Thanks,
But this still doesn't answer my question, which is concerned with the
implementation
of libglade. Assuming there is only one .glade file, I want to know
whether widget
instantiation occurs on the fly as the .glade file is being parsed, or
whether it
occurs only after the whole XML file has been parsed.
Second, does libglade validate the XML file or does it just assume it's valid.
It seems to me that XML file validation should be separate and should probably
be done prior to run time (for instance whenever the XML files are installed on
the system).
Thanks,
Neil