"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, $name)
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 semantics.)
Might I ask what you are trying to accomplish with the information from
gtk-perl-list mailing list