Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Tk::bindDump availability?

by Perlbotics (Archbishop)
on Mar 26, 2018 at 18:43 UTC ( [id://1211776]=note: print w/replies, xml ) Need Help??


in reply to Tk::bindDump availability?

I've found it in Tk::Widget. So it should work when invoked on your object. If not, please post an example.

Update: Minimal example:

use Tk; use strict; use warnings; my $mw = MainWindow->new; $mw->Label(-text => 'Hello, world!')->pack; $mw->Button( -text => 'Quit', -command => sub { exit }, )->pack; my (@bindtags) = $mw->bindtags; print "\$mw's bindtags:\n", join("\n", @bindtags), "\n"; print "\nCORRECTION: NOW THE bindDump():\n", $mw->bindDump(); # <-- U +PDATE2 MainLoop;
Output on STDOUT:
mw's bindtags: MainWindow . all CORRECTION: NOW THE bindDump(): ## Binding information for '.', MainWindow=HASH(0xf20e08) ## 1. Binding tag 'MainWindow' has no bindings. 2. Binding tag '.' has no bindings. 3. Binding tag 'all' has these bindings: <Key-F10> : Tk::Callback=SCALAR(0xf57d08) + 'FirstMenu' <Alt-Key> : Tk::Callback=ARRAY(0xf57c48) + 'TraverseToMenu' Tk::Ev=SCALAR(0xcb3258) + : 'K' <<LeftTab>> : Tk::Callback=SCALAR(0xf57ba0) + 'focusPrev' <Key-Tab> : Tk::Callback=SCALAR(0xf57bb8) + 'focusNext'

No use Tk::Widget; required. That is done automatically.

Update2: Thanks to beech for pointing out that the real call to bindDump() was missing.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found