Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: TK param passing

by Discipulus (Canon)
on Apr 24, 2018 at 07:11 UTC ( [id://1213468]=note: print w/replies, xml ) Need Help??


in reply to TK param passing

Hello jsteng,

When you specify a callback (this is the magic word to search for) for a Tk action and this callback need arguments you need to pass an anonymous array with the function and it's arguments

-command => [ \&subname, arg1, arg2 ... ]

See it explained in it's own doc: Tk::callbacks

In your example, if I understand it correctly $yscroll arrives as $b in the sub and the anonymous array [$p1, $p2, $p3, $p4, $p5] arrives as $wigs in the sub.

Anyway, as AnonymousMonk telegraphically stated, use Data::Dump and it's dd method to dump what @_ is inside of your sub.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2024-04-24 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found