On Tue, Aug 8, 2017 at 3:18 PM, "Torsten Schönfeld" <
> "Robin Lee" <robinlee.s...@gmail.com>:
> > I am playing GIRepository with G::O::I.
> > I get a GIRepository::BaseInfo object from gir get_info funtion.
> > One question is how to test whether this object is a
> > And another question is how to cast this object to a
> For a normal GObject-based library, the C hierarchy would be mapped to
> Perl package hierarchy so that you could use $object->isa('Package') and so
> that casting wouldn't be necessary.
> But GIRepository is not a GObject-based library, so you're basically in
> uncharted territory here Glib::Object::Introspection has not been written
> and tested with this application in mind. But try calling ->get_type() on
> the GIRepository::BaseInfo object. Once you know the type, try calling
> child class methods fully-qualified, for example:
> GIRepository::Struct::find_method ($base_info_which_is_struct_info,
> Also, have a look at what 'perli11ndoc' presents for GIRepository to maybe
> get a better idea of what is possible. (The calling syntax presented
> might, however, not be correct, because 'perli11ndoc' also assumes GObject
Thank you! I found the calling method from perli11ndoc:
As for your example, the correct way is
That seems all 'methods' of the types derived from BaseInfo become
> Might I ask what you are trying to accomplish with the information from
I am learning GI and want to try all the APIs of the GIR library. Using a
scripting language is convenient for this task.
> gtk-perl-list mailing list
gtk-perl-list mailing list