dimmesdale has asked for the wisdom of the Perl Monks concerning the following question:
However, an error, seemingly out of no where popped up. I've been working on a callback function bound to a Button-1 click on a certain image type. Fine. Everything worked. Well, then I copied that line to another place in the file (reason would require knowledge of subroutine, which I don't think is needed for the question), and did some slight changes.
AND THEN...
NOTHING! Same thing as before, but the function was never entered! I removed the (rather commented out the) code I added, but still nothing. So it must have been something somehow got changed in the bind statement, or an assignment to some value that affects that -- but having beens staring at this code far too long I can't spot it (or maybe I'm looking in the wrong place). Here's what I think is relavent:
my $card_dir = 'C:\tk_proj\cards\gif'; my $ext = 'gif'; my $back = $canvas->Photo(-file => "$card_dir\\b1fv.$ext", -format => 'gif'); ... my $dk_img = $canvas->createImage(50,120, -image => $back); ... $canvas->bind($dk_img, "<Button-1>", [\&dk_clk, $deck, $waste]);
Anything I changed in the sub wouldn't take effect (it seems to me) untill the sub was called, so that can't be it. The sub isn't even being called.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tk binding slip up (dissapearance?)
by dree (Monsignor) on Jul 07, 2002 at 12:34 UTC | |
by dimmesdale (Friar) on Jul 07, 2002 at 15:17 UTC |