![]() |
| |||
| Ben Morrow wrote: > Quoth Michele Dondi <bik.mido@tiscalinet.it>: > >>On Wed, 7 Mar 2007 01:06:01 +0100, "Petr Vileta" >><stoupa@practisoft.cz> wrote: >> >> >>>use Tk; >>>use Tk::Label; >>>use Tk::Button; >> >>AFAIK (not much, really) the latter two are not necessary. (But I >>checked and it seems like it's actually so.) > > > They aren't strictly necessary: when you create a Button Tk will > autoload Tk::Button for you. But unfortunately it gives a warning, which > would be *very* confusing for users (or, at least, for *my* users ).With Tk-804 this should not be the case (not with Label and Button): use strict; use warnings; use Tk; my $mw = MainWindow->new( ); $mw->$_()->pack for qw/Label Button Entry Text/; print "but:\n"; $mw->ROText()->pack; MainLoop; Christoph -- use Tk;use Tk::GraphItems;$c=tkinit->Canvas->pack;push@i,Tk::GraphItems-> TextBox(text=>$_,canvas=>$c,x=>$x+=70,y=>100)for(J ust=>another=>Perl=>Hacker); Tk::GraphItems->Connector(source=>$i[$_],target=>$i[$_+1])for(0..2); $c->repeat(30,sub{$_->move(0,4*cos($d+=3.16))for(@i)});MainLoop |
| |||
| On Wed, 7 Mar 2007 20:24:07 +0000, Ben Morrow <ben@morrow.me.uk> wrote: >> It's cool, and certainly useful. Are you a >> PerlMonks user too? If so, then you may also post it in the snippets >> or code sections. If not, may I do so? > >No, I'm not; and yes, of course you may . Could you stick a> > Copyright 2007 Ben Morrow [snip] >section at the bottom? (I should really have done so before posting...) Done: http://perlmonks.org/?node_id=603803 Please note that if anything is not of your liking, the node is updateable. You can reach me by email at <ti tod nfni tod im tod mcl ta razalb>. Michele -- {$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr (($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB=' ..'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_, 256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH, |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |