RE: what does find return for a tk::canvas in scalar context
Christophe Mertz <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Organization | IntuiLab |
| Message-ID | <1105968378.2515.4.camel@datura> |
Thanks for your reply! it will be helpfull. Le Sun 16/01/2005 à 20:16, Jack D. a écrit : > It has changed - but wasn't documented. A patch was issued a few months ago > to describe this change in the POD. > > http://groups.google.ca/groups?selm=cklvm2%241o4s%241%40fidoii.CC.Lehigh.EDU > > Jack > > > -----Original Message----- > > From: [email protected] > > [mailto:[email protected]] On Behalf Of Christophe Mertz > > Sent: January 15, 2005 1:03 PM > > To: ptk > > Subject: what does find return for a tk::canvas in scalar context > > > > Hello, > > > > Happy new year to all list members. > > > > I just tested the value returned by a > > $canvas->find(...command...) in scalar context. > > > > In perl/tk 800, the returned value is the first item found In > > perl/tk 804, the returned value is an array. > > > > Is this considered as a bug, a bug correction or whatever else? > > BTW, the Tk::Canvas man page is the same for both perl/tk > > version and the man page is not very clear on the expected > > results in case of scalar context > > > > > > a simple test case: > > > > use Tk; > > use Tk::Canvas; > > > > my $canvas = MainWindow->new()->Canvas()->pack; > > $canvas->createRectangle(10,10,100,80, -tag => ['foo']); my > > $canvasItem = $canvas->find('withtag','foo'); > > > > print "TkVersion=$Tk::VERSION canvas item is $canvasItem\n"; > > > > > > -- Christophe Mertz > > > > -++**==--++**==--++**==--++**==--++**==--++**==--++**== > > 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 > > [email protected] > > -- Christophe Mertz -++**==--++**==--++**==--++**==--++**==--++**==--++**== 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 [email protected]