Thank you very much for responding to my question. After seeing your reply I quickly checked at the docs for 'global'.
As per perldoc for Tk::Entry it's about the grab thing (i.e. grabbbing the input -- mouse and keyboard). Also from the book
'Mastering Perl/Tk by Oreily Press Chapter 13
- a global grab means no applications in the entire system can get input except the one window that has done the global grab. But Windox XP does allow me to select through mouse as well type into other applications in the system. I do not know if that's how global grab is implemented in this OS.
Anyway, back to the original question, your fix works correctly when the workaround code is removed. Therefore out of curiosity and for learning purposes my question is
- In the first place, how's is the fix for this problem related to grab thing?
- When the workaround code is in place this fix does not work. Therefore, is the grab and virtual event somehow opposed to each other ?
- Also as an aside, I created a binding for the paste (i.e. Control-v) as there is no default binding for it,
$entry->bind('<Control-Key-v>'=>sub{
$_[0]->delete ('sel.first', 'sel.last');
$_[0]->insert ('insert', .....);
});
but how can I get the string to be pasted passed into the callback(hence left out as five dots above) ?
But when I comment out the line calling insert method, the paste works as expected. That said, as per the perldoc for Tk::Entry there is no default binding for Control-v. So how does this work then. I'm confused.
I'm really curious. So please let me know.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.