Re: [gtk-list] Comments about gtk, Perl/Gtk (vs Tk)
- From: Paolo Molaro <lupus lettere unipd it>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Comments about gtk, Perl/Gtk (vs Tk)
- Date: Thu, 9 Apr 1998 13:50:05 +0200
On Thu, Apr 09, 1998 at 10:26:07AM +0300, dov@Orbotech.Co.IL wrote:
> * I found the syntax of the Gtk named parameters much noiser and
> verbose than necessary. Why use
>
> GtkWindow::title => "hello world",
>
> when a simple
>
> -title => "hello world"
>
> would do just as well? I'm sure that the number of ambigious cases
> is very small.
This is a feature of gtk+ to be used mainly for programs generated
by gui builders: I don't think applications should be written in this
manner. What's wrong with:
$win = new Gtk::Window;
$win->set_title('title');?
> * The callback parameter (signal::clicked) should not only take code
> references, but also array references, where the first element in
> the array indicates the function to call, and the rest of the
> parameters are passed to the function when it is called in the
> callback. That's the way it's done in Tk.
This works that way when you call $object->signal_connect(...).
> * In Tk a parent creates it's children. In syntax for the same
> operation in Gtk is much noiser. Compare
>
> Gtk::Widget->new("GtkButton",
> GtkWidget::parent => $window,
> )
> to:
>
> $window->Button()
$window->add(new Gtk::Button);
Something like that can be achieved using AUTOLOAD tricks, but I
don't' thinks it would be that useful...
> * I couldn't get gdk_imlib work from within Gtk. I don't know what
> went wrong, but whatever I did, I always get:
>
> Can't locate object method "init" via package "Gtk::Gdk::ImlibImage"
> at gdkimlib.pl line 5.
What version of the module are you using?
Did you ran perl Makefile.PL --with-gdkimlib?
> THis happened, even though extension.xsh contains:
>
> BOOT:
> {
> callXS (boot_Gtk__Gdk__ImlibImage, cv, mark);
> }
>
> And the compilation seems to have been ok.
Gtk-0.1.1[56] broke the compilation of gdkimlib (at least for me).
Using the version from the cvs works here...
I'm going to merge 0.1.16 with the cvs version later today.
lupus
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]