Re: Tktable question



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
.



Relevant Pages

  • Re: cpuset and affinity implementation
    ... An example would be some sort of system with multiple CPUs where some ... So if you just make a set that includes all cpus in the system you can then bind your realtime threads to specific cpus and the other threads to the remainder. ... The reason individual threads can't be assigned to groups is because cpuset_getidfor a pid wouldn't make sense then and I expect administrators to be mostly interested in managing groups of processes. ... bindings when returning the processor set for the process. ...
    (freebsd-arch)
  • Re: Recovering keys from key events
    ... bind the key events that correspond to these actions, ... other bindings flow through. ... This is exactly how Leo works. ... making a unique callback for every binding. ...
    (comp.lang.tcl)
  • RE: Source Safe Visual Studio bindings incorrect after Share and B
    ... latest version from the new branch so it is easy for the incorrect bindings ... only for some solutions while others appear to bind to the new branch. ... The binding information is stored in .sln file. ... VSS doesn't know about it. ...
    (microsoft.public.vsnet.ide)
  • Re: Binding to menu entry - not just to menu(-tree)
    ... bindings "quite safely"? ... bind .menubar.help.menu ... tag. ... and use helptext() lookup instead of most ...
    (comp.lang.tcl)
  • RE: [COVERT-2001-01] Multiple Vulnerabilities in BIND - FreeBSD Implications ?
    ... Multiple Vulnerabilities in BIND ... BIND 8 contains a buffer overflow that allows a remote attacker to ... This vulnerability has been designated as ...
    (FreeBSD-Security)