Re: Get a list of object *names* from GtkBuilder



Hi;

On 16 November 2015 at 02:26, Daniel Kasak <d j kasak dk gmail com> wrote:
Greetings all.

I'd like to get a list of object names from a GtkBuilder object ( I'm
using Perl ). I know about
https://developer.gnome.org/gtk3/stable/GtkBuilder.html#gtk-builder-get-objects
- which returns a list of objects, but I really need the names. Is it
possible?

The question would be "why do you think you need the names from the
XML, considering you wrote the XML definitions in the first place" —
i.e. since you're the author, you're supposed to already know those
names, not figure them out programmatically.

In practice, you could load up the XML yourself and figure those names
out using the XML::Parser or XML::LibXML modules in Perl; but the
question betrays some confusion as to what GtkBuilder UI definition
files are, and how they are used, so it's probably better for you to
answer the question: what is it that you're trying to achieve?

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[ ] ebassi [ gmail com]


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