Re: Tktable question
- From: Jeff Hobbs <jeffh@xxxxxxxxxxxxxxx>
- Date: Tue, 07 Mar 2006 21:46:40 -0800
Larry W. Virden wrote:
One of the developers was looking in the tktable code to see what it
was doing for bindings and asked why, in this code:
proc ::tk::table::ClipboardKeysyms {copy cut paste} {
bind Table <$copy> {tk_tableCopy %W}
bind Table <$cut> {tk_tableCut %W}
bind Table <$paste> {tk_tablePaste %W}
}
::tk::table::ClipboardKeysyms <Copy> <Cut> <Paste>
what this code was doing. He thought it was some sort of attempt to use
virtual events, but the lack of double angle braces (in other words,
<<Copy>>, etc.) confused him.
1. Has anyone else seen a problem like this - where after copying the
data from a tk application, subsequent attempts to copy data fail to
place the data into the appropriate buffer?
2. Is there some problem with the events being used above?
If you examine the code, you will see that it is acting just right.
The <Copy> will become <<Copy>>. That allows Control-c to be
passed in. I picked that up from some other core Tk code ... it
would probably be better to force the user to fully specify the
binding to reduce calling confusion.
As to copy failing ... you may check the primary vs. secondary
buffers or something, check for -exportselection somewhere perhaps
screwing things up, etc.
--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos
.
- References:
- Tktable question
- From: Larry W. Virden
- Tktable question
- Prev by Date: Re: Tcl the misunderstood
- Next by Date: Re: Messaging alert
- Previous by thread: Tktable question
- Next by thread: Re: Tktable question
- Index(es):
Relevant Pages
|