Re: menuitem confusion

On 01.07.2012 15:05, Dave M wrote:
   return Glib::Object::Introspection->invoke (
     $_GTK_BASENAME, 'RadioMenuItem', 'new',
     $class, $group);

Unfortunately, that was the FIRST thing I tried because that's what
all the examples show..  :) And it results in:

Can't find information for method RadioMenuItem::new at ./

Weird, works for me:

# perl -MGtk3 -E'Gtk3::init; warn Glib::Object::Introspection->invoke ("Gtk", "RadioMenuItem", "new", "Gtk3::RadioMenuItem", []);'
  Gtk3::RadioMenuItem=HASH(0x99e42b0) at -e line 1.

In your <prefix>/share/gir-1.0/Gtk-3.0.gir file, what's the entry for gtk_radio_menu_item_new? Mine is located under the class RadioMenuItem and basically looks like this:

      <constructor name="new" c:identifier="gtk_radio_menu_item_new">
        <return-value transfer-ownership="none">
          <doc xml:whitespace="preserve">a new #GtkRadioMenuItem</doc>
          <type name="Widget" c:type="GtkWidget*"/>
          <parameter name="group" transfer-ownership="none">
            <type name="GLib.SList" c:type="GSList*">
              <type name="RadioMenuItem"/>

(You might have to install gtk+'s development package to get this file.)

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