Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Doing what a menu command would do with out selecting it

by benn (Priest)
on Aug 13, 2003 at 18:59 UTC ( #283658=note: print w/ replies, xml ) Need Help??


in reply to Doing what a menu command would do with out selecting it

As no Tk experts seem to be forthcoming, (I'm certainly not), I have just one suggestion - have you checked that $c (your canvas?) is being passed into your routine? When called from the menu command, it passes in @_ - maybe that's the canvas being passed into the menu handler.

just my farthing's worth...
Ben.


Comment on Re: Doing what a menu command would do with out selecting it
Re: Re: Doing what a menu command would do with out selecting it
by Anonymous Monk on Aug 13, 2003 at 19:30 UTC
    Ben,
    What would that look like?
    I've inhereted the code, and I'm no master at Perl or Tk.
    Thanks,
    Mark
      Well, presumably somewhere you're calling "select_all". Try calling select_all($canvas), where $canvas is whatever variable is used to store/create your canvas.

      One way to find out what is being passed is to add some debugging - try printing out the value of $c at the top of the "select_all" routine, running the program and using your menu command to 'Select All'. Hopefully you should be able to see what's being passed in, and emulate it in your own "select_all" call.

      Hope this helps,
      Ben.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://283658]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-07-04 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (58 votes), past polls