Re: [gtk-list] Perl/Gtk CVS 19990920
- From: Paolo Molaro <lupus lettere unipd it>
- To: "gtk-list redhat com" <gtk-list redhat com>
- Subject: Re: [gtk-list] Perl/Gtk CVS 19990920
- Date: Tue, 21 Sep 1999 12:35:16 +0200
On Mon, Sep 20, 1999 at 08:10:50PM +0000, Dermot Musgrove wrote:
> * Gtk::Clock - I guess that this is not in CVS yet?
> while trying to eval '$widgets->{'clock2'}->type('realtime' );'
> FAILED with Eval error 'Unknown argument type of GtkClock at ...
>
> I tried using set() but then I got this:
> while trying to eval '$widgets->{'clock2'}->set('type', 'realtime' );'
> FAILED with Eval error 'Usage: Gtk::Label::set(self, string) at ....
> I don't understand what's wrong.
It's wrong that you assume every widget has proper implementation
for every possible arg you think of:-)
GtkClock doesn't have a "type" GtkArg, so it's impossible for the
perl module to set the "type" arg of a GtkClock object.
Just build the widget with:
$clock = new Gtk::Clock('realtime');
You cannot change the type later from perl because you cannot change
it from C either (with the published interface, at least).
> * Gtk::Layout->new(undef, undef) doesn't work, not in CVS yet?
My bad: I modified the GtkLayout in Gtk, but it gets built the one in
Gnome. I'll change this soon (along with GtkSocket/Plug, I guess).
> * Gtk::Pixmap->set_build_insensitive('0'); suddenly doesn't work. I have
> used Gtk::Pixmap->set('build_insensitive', '0'); instead, is this correct?
I wonder how Gtk::Pixmap->set_build_insensitive('0') ever worked since
it's not bound in any version of the module I know of (and also
according to the cvs logs).
Here again "build_insensitive" is not an arg for Gtk::Pixmap.
I think the args for the widget types are documented in the RDP
manuals for gtk+: you may want to check them.
There is another issue here anyway: the GtkPixmap api is broken
when used in a OO language like perl, because it uses the same
method name of a parent class (gtk_object_set()). In this case
you may need to use something like:
$pixmap->Gtk::Object::set("argname", $argval); # ugh!
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]