proc ::tkcon::GetSelection {w} {
if {
![catch {selection get -displayof $w -type UTF8_STRING} txt] ||
![catch {selection get -displayof $w} txt] ||
![catch {selection get -displayof $w -selection CLIPBOARD} txt]
} {
return $txt
}
return -code error "could not find default selection"
}Remove the first two lines of the if test expression.If you are developing an application using Tkcon as an application console you can copy new definitions of procedures from your text editor and paste them into the console in the running application, and this will not be affected by the current selection (if any) in the application itself.Hope this helps, Alastair Davies 31 Jan 2007Someone comments: It would be neat if tkcon were improved to provide the user the ability to select the source for the paste.Alastair Davies: Perhaps it should depend on the platform by default; I think the current behaviour is fairly standard for X11 applications (see Primary Transfer vs. the Clipboard), just a bit disconcerting on Windows. I ran into the problem particularly with the Tablelist widget, which sets the primary selection. This makes it impossible to paste into Tkcon from the clipboard whilst my application is running.Category Debugging