| slaven@rezic.de 2004-08-05, 3:56 am |
| The patch below enables the gridRemove method in Perl/Tk.
Regards,
Slaven
--- ./Tk/Widget.pm.orig 2004-03-17 17:00:32.000000000 +0100
+++ ./Tk/Widget.pm 2004-08-05 02:15:35.000000000 +0200
@@ -63,7 +63,7 @@ sub False { 0 }
use Tk::Submethods( 'grab' => [qw(current status release -global)],
'focus' => [qw(-force -lastfor)],
'pack' => [qw(configure forget info propagate slaves)],
- 'grid' => [qw(bbox columnconfigure configure forget info location propagate rowconfigure size slaves)],
+ 'grid' => [qw(bbox columnconfigure configure forget info location propagate remove rowconfigure size slaves)],
'form' => [qw(check configure forget grid info slaves)],
'event' => [qw(add delete generate info)],
'place' => [qw(configure forget info slaves)],
@@ -1151,7 +1151,7 @@ sub grid
{
local $SIG{'__DIE__'} = \&Carp::croak;
my $w = shift;
- if (@_ && $_[0] =~ /^(? :bbox|columnconfigure|configure|forget|i
nfo|location|propagate|rowconfigure|size
|slaves)$/x)
+ if (@_ && $_[0] =~ /^(? :bbox|columnconfigure|configure|forget|i
nfo|location|propagate|remove|rowconfigu
re|size|slaves)$/x)
{
my $opt = shift;
Tk::grid($opt,$w,@_);
--- ./t/geomgr.t.orig 2004-08-05 02:25:26.000000000 +0200
+++ ./t/geomgr.t 2004-08-05 02:26:33.000000000 +0200
@@ -4,7 +4,7 @@ BEGIN { $|=1; $^W=1; }
use strict;
use Test;
-BEGIN { plan tests => 19 };
+BEGIN { plan tests => 21 };
use Tk;
use Tk::Button;
@@ -73,6 +73,18 @@ eval { $mw->geometry('+10+10'); }; # Th
$b->destroy;
}
+##
+## gridRemove is missing in Tk804.027 and earlier
+##
+{
+ my $b = $mw->Button();
+ $b->grid;
+ $b->gridRemove;
+ ok(1);
+ $b->grid;
+ $b->grid('remove');
+ ok(1);
+}
1;
__END__
--
__o Slaven Rezic
_`\<,_ slaven <at> rezic <dot> de
__(_)/ (_)____
________________________________________
______________________________________
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
|