Paul Schinder <[EMAIL PROTECTED]> writes:

> At 4:16 PM +0000 1/17/00, Hans J�rgen Helgesen wrote:
> >Hmmm...
> >
> >I'm using Tk800.011 on Sun Solaris myself and it's difficult for me 
> >to try 800.017. The code that fails tries to create Button ($b) 
> >which is identical to another Button ($h). This is done by obtaining 
> >all configure options from the old one and pass them to the Button 
> >constructor. It looks OK to me, but perhaps there are some 
> >none-portable stuff here?
> >
> >    my @opt = map {$_->[0] => $h->cget($_->[0])} $h->configure;
> >    my $b=$tl->Button(@opt)->pack(-expand=>1,-fill=>'both');
> >
> 
> I can't really help you there, since I seldom use Tk myself.  The 
> author of Tk probably could, or you could ask on comp.lang.perl.tk. 
> 800.011 is pretty ancient, isn't it?  It wouldn't surprise me if 
> things have changed.
> 

A number of things changed in .016 and .017, especially the wantarray
behaviour. The line below (with an additional scalar) could solve the
problem.


    my @opt = map {$_->[0] => scalar($h->cget($_->[0]))} $h->configure;

Regards,
        Slaven

-- 
use Tk;$c=tkinit->Canvas(-he,20)->grid;$x=5;map{s!\n!!g;map{create$c 'line'=>
map{$a=-43+ord;($x+($a>>3)*2=>5+($a&7)*2)}split''}split"!";$x+=12}split/_/=>'K
PI1_+09IPK_K;-OA1_+K!;A__1;Q!7G_1+QK_3CLPI90,_+K!;A_+1!KQ!.N_K+1Q!.F_1+KN.Q__1+
KN._K+1Q!.F_1+KN.Q_+1Q__+1!KQ!.N_1;Q!7G_K3,09Q_+1!K.Q_K+1Q!.F_1+KN.Q_';MainLoop

Reply via email to