Re: $notebook->append_page doesn't return page number :-(

On Fri, 2005-04-08 at 15:21, Dawid Zamirski wrote:

According to the Gtk documentation, the return value of
$notebook->append_page(...); should be an integer that represents the
index of the page that just has been appended (
). Now I have in my code something like this:

sub onButtonNew_clicked
        my $page = $notebook->append_page($gtkwidget1, $gtkwidget2)

.. and I get an error that the argument of printf has undefined
value.. Can someone please explain the proper syntax? Thank You

the behavior of those functions were changed in gtk+ (c) version 2.4.
starting with Gtk2 (perl) version 1.080 that change was bound and faked
out for older versions of gtk+. the docs on the website are for version
1.080 of the Gtk2 bindings and thus show the integer return type, but if
you have an older version that facility will not be supported.

have a look here for the related changes:

i'm going to add some pod doc on this subject to the affected functions.
to avoid future confusion.


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