Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: multiple method calls against the same object, revisited

by gaal (Parson)
on Dec 25, 2004 at 19:27 UTC ( #417423=note: print w/ replies, xml ) Need Help??


in reply to Re: multiple method calls against the same object, revisited
in thread multiple method calls against the same object, revisited

Pascal! :)

Maybe an "on a" modifier?

.signal_connect( :clicked{ Gtk2.main_quit } ) on Gtk2::Button.new( "Quit" );

Indirect object syntax would make that sounds even more like English. But this is probably stretching it too far anyway.


Comment on Re^2: multiple method calls against the same object, revisited
Download Code
Re^3: multiple method calls against the same object, revisited
by Aristotle (Chancellor) on Dec 28, 2004 at 09:57 UTC

    But how would you do multiple calls against the same thing?

    { .signal_connect( :delete{ Gtk2.main_quit } ); .set_title( "Test" ); .border_width( 15 ); .add( .signal_connect( :clicked{ Gtk2.main_quit } ) on Gtk2::Butto +n.new( "Quit" ) ); .show_all; } on Gtk2::Window.new( "toplevel" );

    There is a simple analogon in Perl5:

    my $window = map { $_->signal_connect( delete_event => sub { Gtk2->main_quit } ); $_->set_title( "Test" ); $_->set_border_width( 15 ); $_->add( map { $_->signal_connect( clicked => sub { Gtk2->main_quit } ); $_; } Gtk2::Button->new( "Quit" ) ); $_->show_all(); $_; } Gtk2::Window->new( "toplevel" );

    Meh. It puts things in the wrong order IMO.

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://417423]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-09-21 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls