placeForget behavior 
Author Message
 placeForget behavior

hi,

I'm probably misunderstanding something, but it doesn't seem to me
that the placeForget method works how the manual says it does.  Here's
what the manual says:

"The placeForget method causes the placer to stop managing the geometry
of $slave. As a side effect of this command $slave will be unmapped so
that it doesn't appear on the screen. If $slave isn't currently
managed by the placer then the command has no effect. placeForget
returns an empty string as result."

however, this program results in an error (apparently $slave should
not be a perl/tk widget object?).  Any ideas?

the error is:

wrong # args: should be "place forget pathName" at
/usr/local/lib/perl5/site_perl/5.005/i386-freebsd/Tk/Widget.pm line 939.  

and the code is:

#!/usr/local/bin/perl

use strict;
use Tk;

my $mw = MainWindow->new();
my $lbl = $mw->Label(-text => "yoooooooooooo");
$lbl->place(-relwidth => .5, -relx => .5, -rely => .5);
$mw->placeForget($lbl);
Tk::MainLoop();



Fri, 22 Jun 2001 03:00:00 GMT  
 placeForget behavior

Quote:
> $mw->placeForget($lbl);

This should be

        $lbl->placeForget

It seems that your documentation is not up to date. The current
Tk::place manpage is more accurate about this method.

Regards,
        Slaven

--
use Tk;$c=tkinit->Canvas->pack;$x=45;for(split/_/,'KPI1_+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'){s/\n//g;for(split/!/){$c->create(
'line',map{$a=-43+ord;($x+($a>>3)*2,123+($a&7)*2)}split//)}$x+=12}MainLoop



Fri, 22 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. placeForget all at once ?

2. Strange $n behavior

3. Question about object behavior in Net::FTP

4. What causes this bizarre hash behavior?

5. Strange behavior in sort_by_field

6. Apparently inconsistent behavior in a CGI program

7. Unexpected glob behavior nt4-ActivePerl-5.6

8. strange behavior of URI inside a package

9. Puzzling behavior of map()

10. strange behavior of shift under 5.005

11. Equivalence (was: Is this normal taint behavior?)

12. Is this normal taint behavior?

 

 
Powered by phpBB® Forum Software