Anonymous user
Simple windowed application: Difference between revisions
→{{header|Perl 6}}: style
Thundergnat (talk | contribs) (→{{header|Perl 6}}: Added Perl 6 implementation) |
(→{{header|Perl 6}}: style) |
||
Line 1,377:
GTK::Simple::VBox.new(
my $label = GTK::Simple::Label.new( text => 'There have been no clicks yet'),
my $button = GTK::Simple::Button.new(label => 'click me'),
)
);
Line 1,383:
$app.border_width = 40;
$button.clicked.tap
state $clicks += 1;
$label.text = "There has been $clicks click{ 's' if $clicks != 1 }";
}
$app.run;</lang>
|