Re: [gtk-list] Comments about gtk, Perl/Gtk (vs Tk)



On Thu, 9 Apr 1998 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.

Simply because I couldn't find any elegant way to implement this. Yes, I
agree completely that it would be nice. 

> * 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.

Simply pass more then one argument: they'll be passed, in turn, to the
function. Perhaps the array approach should also be valid (it might simply
some implementation, I'll admit.)

> * 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()

<Shrug> This is GTK, not TK, and some things are simply different. There's
no particular reason I couldn't add a "create_child" function. You could
write it, too.

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)




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