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 | <1105819388.6959.23.camel@datura> |
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]