Re: Some differences between Gtk and Gtk2



Guillaume Cottenceau wrote:

$tree_view->signal_connect(button_press_event => sub { .. });

Perl will correctly convert the bareword to a string. Granted,
there can be confusion because when extracting the type of the
event, gtk sends it back in the '-' form, as discussed above.

That's true, but I'd say the possibility of omitting the quotes here is
more important than this slightly confusion. Ok, in Gtk signal names use
'-', but if Perl Gtk2 can do the magic, that we may use '_' instead with
all it's syntactic advantages, we shouldn't drop this. If the 
application developer is confused by that, he simply should use the 
original style 'button-press-event' => sub { }, forget about the 
alternatives Perl offers and get happy ;)

Regards,

Joern

-- 
Joern Reder
Development Head ZYN! Coding Division - http://www.zyn.de/




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