├── ChangeLog ├── Makefile.in ├── README.txt ├── aclocal.m4 ├── configure ├── configure.ac ├── docs ├── bindings.html ├── changes.txt ├── demopic.png ├── dump.html ├── dump.n.man ├── idebug.html ├── idebug.n.man ├── index.html ├── license.terms ├── limits.html ├── nontcl.html ├── observe.html ├── observe.n.man ├── perl.txt ├── plugin.html ├── procs.html ├── purpose.html ├── start.html ├── style.css ├── tkcon.1.man ├── tkcon.html ├── tkcon.n.man ├── tkconrc.5.man └── todo.html ├── extra ├── console1_1.tcl └── stripped.tcl ├── icons ├── tkcon-small.svg └── tkcon-small48.png ├── index.html ├── install-desktop-menu.sh ├── pkgIndex.tcl ├── tclconfig ├── ChangeLog ├── README.txt ├── install-sh ├── license.terms └── tcl.m4 ├── tkcon-console.desktop └── tkcon.tcl /ChangeLog: -------------------------------------------------------------------------------- 1 | 2016-09-14 Jeff Hobbs 2 | 3 | * tkcon.tcl: Use -underline clearly to disambiguate from new 8.6.6 4 | option -underlinefg [Bug #54] (bachmann) 5 | 6 | 2015-10-20 Jeff Hobbs 7 | 8 | * tkcon.tcl (edit): prevent file edit from undoing loading of file 9 | [Bug #52] (budyak) 10 | 11 | 2014-09-09 Jeff Hobbs 12 | 13 | * tkcon.tcl (::tkcon::SaveHistory): save history at each command 14 | to prevent loss during abnormal termination. [bachmann] 15 | 16 | 2014-07-09 Jeff Hobbs 17 | 18 | * tkcon.tcl (idebug): allow multi-char patterns as debug id [Lama] 19 | 20 | 2013-01-22 Jeff Hobbs 21 | 22 | * tkcon.tcl (tkcon show): catch deiconify as it will throw an 23 | error if tkcon is embedded. 24 | 25 | 2012-12-27 Jeff Hobbs 26 | 27 | * tkcon.tcl (edit): add support for ::tkcon::OPT(tabspace) to 28 | adjust tab spacing in edit window (default: 8). [Bug #7] 29 | 30 | * tkcon.tcl (::tkcon::Bindings): minimal patch for 8.6b3+ event 31 | compatibility. Larger patch to come that addresses shift towards 32 | virtual events in core widgets. [Bug #48] (gollwitzer) 33 | 34 | * docs/{dump.man,tkcon.1.man,tkconc.5.man}: make dtplite happy for 35 | the docs [Bug #47] 36 | 37 | * tkcon.tcl (::tkcon::Init): update to use latest /viewvc/tkcon 38 | url to retrieve head version of tkcon. 39 | 40 | * tkcon.tcl (::tkcon::InitUI): catch deiconify to prevent error 41 | when embedding. [Bug #44] 42 | 43 | * tkcon.tcl (::tkcon::ExpandMethodname): improved expansion for 44 | xotcl methods. Also enhance expansion to allow break/continue 45 | signals to differentiate "I'm not responsible" results from "I 46 | don't have any results". (neumann) 47 | 48 | * tkcon.tcl (::tkcon::InitInterp): correct sending tkcon commands 49 | to user created interps [Bug #42] (kuhn) 50 | 51 | 2012-03-06 Jeff Hobbs 52 | 53 | * tkcon.tcl (idebug): better line handling to not use list 54 | functions. [Bug 111462] (goth) 55 | (tkcon): pass any init args to 'tkcon show' 56 | 57 | 2011-10-28 Jeff Hobbs 58 | 59 | * pkgIndex.tcl: update to v2.7 60 | * tkcon.tcl: Improve UI to work on OS X. Adjust some dialogs, 61 | use Command- instead of Control- bindings on OS X. Handle right 62 | click properly. 63 | 64 | * docs/license.terms: removed outdated restricted rights section. 65 | 66 | 2010-01-24 Pat Thoyts 67 | 68 | * icons/*: Added an SVG icon and .desktop file suitable 69 | * tkcon-console.desktop: for use installing tkcon into the desktop 70 | * install-desktop-menu.sh: menus on a unix desktop. Also an install 71 | * tkcon.tcl: script to show how it is done. And for 72 | use with 8.6 on X11 - if we can locate the icon, use it as the 73 | tkcon iconphoto so it shows up associated with the running app. 74 | 75 | 2010-01-23 Pat Thoyts 76 | 77 | * tkcon.tcl: Make use of the extended window manager hints from 78 | tip 359 on unix for all the dialog windows. 79 | 80 | 2009-04-24 Jeff Hobbs 81 | 82 | * tkcon.tcl: override 8.5 [chan puts|gets]. [Bug 1876707] 83 | 84 | * tkcon.tcl: update pre-8.4 private text binding refs 85 | 86 | * tkcon.tcl: clean up cmd global var used [Bug 2441583] 87 | 88 | * tkcon.tcl (::tkcon::Retrieve): support http code redirect for 89 | downloading latest version. [Bug 1755500] 90 | 91 | * README.txt, docs/limits.html, docs/nontcl.html: bump to 2.6 92 | * pkgIndex.tcl, tkcon.tcl: Use Tcl 8.4 code style. 93 | 94 | 2009-02-26 Jeff Hobbs 95 | 96 | **** TKCON 2.5 TAGGED FOR RELEASE **** 97 | 98 | * index.html, docs/*.html: update links and references 99 | 100 | 2009-02-25 Jeff Hobbs 101 | 102 | * docs/tkcon.html, docs/tkcon.n.man: add tkcon resultfilter docs. 103 | 104 | 2008-02-07 Jeff Hobbs 105 | 106 | * tkcon.tcl (::tkcon::Bindings): prevent Expand virtual events 107 | from triggering follow-on events (most important for ). 108 | (::tkcon::Retrieve): remove extraneous http::geturl call. 109 | 110 | 2007-06-22 Jeff Hobbs 111 | 112 | * tkcon.tcl (::tkcon::EvalCmd): add OPT(resultfilter) and 'tkcon 113 | resultfilter ?cmd?' to allow optional result filter command. 114 | Command will be passed result code and data and must return what 115 | tkcon will return to the user. Command is run in attached slave. 116 | Ensure that initial files are sources at level #0. 117 | Convert args after (--|-argv|-args) into slave arguments and set 118 | them as the main $::argv/$::argc for propagation. 119 | 120 | 2007-06-21 Jeff Hobbs 121 | 122 | * docs/tkcon.1.man, docs/tkcon.n.man, docs/tkconrc.5.man (new): 123 | * docs/dump.n.man, docs/observe.n.man, docs/idebug.n.man (new): 124 | * index.html, docs/demopic.gif (removed), docs/demopic.png (new): 125 | * docs/plugin.html, docs/start.html, docs/tkcon.html: 126 | Updated docs and added doctools equivalents courtesy Sergei Golovan 127 | * docs/style.css: updated stylesheet 128 | 129 | 2007-04-04 Jeff Hobbs 130 | 131 | *** BUMPED TO VERSION 2.5 *** 132 | 133 | * tkcon.tcl: ensure option overrides only effect tkcon and 134 | subwidgets. 135 | (edit): Add -wrap option to 'edit' command. 136 | (::tkcon::AtSource): adjust argv0 existence check 137 | 138 | 2006-09-05 Jeff Hobbs 139 | 140 | * tkcon.tcl (::tkcon::NewTab, ::tkcon::GetSlave): ensure that new 141 | tabs in other toplevel tkcon windows are built in the correct 142 | slave hierarchy. 143 | 144 | * pkgIndex.tcl: sample pkgIndex.tcl that allows using tkcon as a 145 | package. 146 | 147 | * tkcon.tcl (::tkcon::InitSlave): adjust to make the first file 148 | passed in to be argv0 in the slave 149 | 150 | 2006-08-25 Jeff Hobbs 151 | 152 | * tkcon.tcl (tkcon): default wm protocol to hide tkcon when used 153 | in embedded context. 154 | 155 | 2006-08-23 Jeff Hobbs 156 | 157 | * tkcon.tcl: remove use of -exact in package require Tk 158 | 159 | 2006-06-29 Jeff Hobbs 160 | 161 | * tkcon.tcl: updated to handle ttk scrollbars as well as other UI 162 | cleanup. 163 | 164 | 2006-06-15 Jeff Hobbs 165 | 166 | * tkcon.tcl: modify CVS location after SF changes 167 | 168 | * README.txt: correct reference email address 169 | 170 | 2006-02-28 Jeff Hobbs 171 | 172 | * tkcon.tcl (tkcon): update 'gets stdin' override (tkcon congets) 173 | to support usage at script load time. (decoster) 174 | 175 | 2006-01-25 Jeff Hobbs 176 | 177 | * tkcon.tcl (MenuConfigure): Fix ActiveTcl Help link when pointing 178 | to a file with space in path. [Bug 1408425] 179 | (::tkcon::Save, ::tkcon::Load): in VFS paths, use the X11 dialogs 180 | that support viewing in VFS dirs. 181 | 182 | 2005-09-12 Jeff Hobbs 183 | 184 | * tkcon.tcl (::tkcon::AtSource): do not require argv to be defined 185 | (edit): enable text -undo in editor 186 | (::tkcon::InitUI): shrink aqua resize control space alloted 187 | 188 | 2005-07-14 Jeff Hobbs 189 | 190 | * tkcon.tcl: add ::tkcon::OPT(maxlinelen) (default 0 == unlimited) 191 | and 'tkcon linelength ?value?' to optionally limit long result 192 | lines. True result is still captured in $_ (and 'puts $_' works). 193 | 194 | 2005-05-25 Jeff Hobbs 195 | 196 | * tkcon.tcl (InitMenus): add ActiveTcl Help menu item, if AT Help 197 | is found. 198 | 199 | 2005-04-06 Jeff Hobbs 200 | 201 | * tkcon.tcl (ExpandXotcl): allow for xotcl method name expansion, 202 | if you change ::tkcon::OPT(expandorder) to include Xotcl before 203 | Procname 204 | 205 | 2005-02-21 Jeff Hobbs 206 | 207 | * tkcon.tcl (::send::send): propagate -displayof to winfo interps 208 | call. [Bug 1124369] (mbec) 209 | 210 | 2004-11-17 Jeff Hobbs 211 | 212 | * tkcon.tcl (::tkcon::ExpandVariable): correct array keyname 213 | expansion. [Bug 1004508] (bold) 214 | 215 | 2004-11-12 Jeff Hobbs 216 | 217 | * tkcon.tcl (::tkcon::EvalSocket): pass sock arg. (allaert) 218 | 219 | 2004-11-11 Jeff Hobbs 220 | 221 | * tkcon.tcl (::tkcon::DeleteTab): allow for exit code to be passed 222 | when exit is aliased to DeleteTab. [Bug 1064462] 223 | (::tkcon::Expect): graphicsSet isn't valid yet 224 | 225 | 2004-10-10 Jeff Hobbs 226 | 227 | * tkcon.tcl (::tkcon::Highlight): use ctext for the 'edit' dialog 228 | if available 229 | 230 | 2004-07-26 Jeff Hobbs 231 | 232 | **** TKCON 2.4 TAGGED FOR RELEASE **** 233 | 234 | * index.html, docs/*.html: remove email links, update 2.4 info 235 | * docs/plugin.html: update plugin page embed code 236 | 237 | 2004-06-24 Jeff Hobbs 238 | 239 | * tkcon.tcl (DeleteTab, Destroy): improve the 'exit' handling so 240 | that 'exit' in the first created tab doesn't do a full exit. 241 | 'exit' in the last tab of the first created console still exits 242 | tkcon, fixing that requires a rearch of the console 243 | creation/management. 244 | (InitTab): Have the binding only fire for the root 245 | window, not for each tab. 246 | (GotoTab): Keep tabs around - just raise/lower instead of grid 247 | remove/add. break on Next/Prev Tab binding to get focus right. 248 | (Prompt): return if console w doesn't exist 249 | 250 | 2004-06-10 Jeff Hobbs 251 | 252 | * tkcon.tcl: add [X] tab delete button and Console -> Delete Tab 253 | menu item. [Bug 970785] 254 | 255 | 2004-05-12 Jeff Hobbs 256 | 257 | * tkcon.tcl (observe): allow observe of 'proc' 258 | 259 | 2004-03-20 Jeff Hobbs 260 | 261 | * tkcon.tcl (::tkcon::EvalSocketEvent): correctly handle socket 262 | events after attachment changes 263 | 264 | 2004-03-01 Jeff Hobbs 265 | 266 | * tkcon.tcl: correct 'exit' in extra tabs. 267 | make tkconfixed font Courier -12 (was Courier 10), use it on unix. 268 | Add extra space for OS X/Aqua in statusbar (for resize handle). 269 | Only use -overrelief in 8.4 270 | 271 | 2004-02-12 Jeff Hobbs 272 | 273 | * tkcon.tcl (::tkcon::InitUI): check existence of tcl_platform(os) 274 | as it doesn't exist in the Tcl plugin. 275 | Show Attach info in tab text, maintain namespace attachment 276 | between console switches. 277 | (::tkcon::InterpEval, Interps): beware safe interps with Tk 278 | 279 | 2004-02-05 Jeff Hobbs 280 | 281 | * tkcon.tcl: brought code back to 8.0 compatability. 282 | Use $_ as last cached result var (was ${}). 283 | Ensure hoterrors garbage collection occurs across all tabs. 284 | 285 | 2004-01-29 Jeff Hobbs 286 | 287 | * tkcon.tcl: first whack at tabbed consoles 288 | 289 | 2004-01-28 Jeff Hobbs 290 | 291 | * tkcon.tcl: don't use menu tearoffs 292 | remove recognizable email addresses from source 293 | enabled more send variants (comm, dde, winsend) [bug 649257] (thoyts) 294 | change Packages menu (that would be too large with many packages) 295 | to a Manage Packages dialog. 296 | tightened up Create Socket dialog, added dismiss binding. 297 | Moved source time initialization into ::tkcon::AtSource to guard 298 | against leftover vars and just better encapsulate it. 299 | (::tkcon::Retrieve): correct retrieve URL and add intelligence to 300 | sense whether what we retrieved is correct before overwriting file. 301 | 302 | 2003-11-18 Jeff Hobbs 303 | 304 | * tkcon.tcl (::tkcon::InitSlave): remove tk_library from the 305 | seeded auto_path. Do not add OPT(library) to auto_path if it is "". 306 | 307 | 2003-11-04 Jeff Hobbs 308 | 309 | * tkcon.tcl (::tkcon::EvalSocketClosed): use tk_messageBox instead 310 | of tk_dialog 311 | 312 | 2003-10-06 Jeff Hobbs 313 | 314 | * tkcon.tcl (dir): use %9ld instead of %9d to support large files 315 | 316 | 2003-04-08 Jeff Hobbs 317 | 318 | * tkcon.tcl (::tkcon::InitUI): WinCE code to resize the window to 319 | fit on the small screen 320 | 321 | 2003-03-31 Jeff Hobbs 322 | 323 | * tkcon.tcl (tkcon::Retrieve): correct the check for tkcon version 324 | when retrieving from http. 325 | 326 | 2003-02-20 Jeff Hobbs 327 | 328 | * tkcon.tcl (EvalCmd): set $:: (aka ${}) var to last command result. 329 | (EvalOther): use tk_messageBox instead of tk_dialog 330 | (Init): allow 'edit' to be overridden using OPT(edit) 331 | 332 | 2003-01-13 Jeff Hobbs 333 | 334 | * tkcon.tcl: add tk appname alias in WWW plugin case. 335 | 336 | 2002-10-08 Jeff Hobbs 337 | 338 | * tkcon.tcl (tcl_unknown): allow ::namespace (:'s) to be 339 | recognized. (koloska) 340 | (MainInit): add option for overriding exit command. 341 | (InitUI): add option to control the wm protocol for WM_DELETE_WINDOW. 342 | 343 | 2002-10-01 Jeff Hobbs 344 | 345 | * tkcon.tcl (InterpEval): correctly handle no args case. 346 | (New): autoload tbcload when it exists. 347 | 348 | 2002-06-22 Jeff Hobbs 349 | 350 | * tkcon.tcl: call Init with eval to break out argv into args. 351 | 352 | 2002-06-04 Jeff Hobbs 353 | 354 | * tkcon.tcl (Init): convert env(home) from 'C:' to 'C:/' if necessary. 355 | 356 | 2002-06-03 Jeff Hobbs 357 | 358 | * tkcon.tcl: fixed Retrieve to use the proxy info (Thoyts). 359 | Added code so that tkcon.tcl can be sourced in and used like a 360 | quasi-package. Once sourced, you can do a 'package require tkcon' 361 | (there is no pkgIndex.tcl for it), and the first 'tkcon show' will 362 | initialize anything that is needed. 363 | (observe): corrected variables tracing to not allow duplicates. 364 | (dump): improved check for empty named arrays as well as locally 365 | aliased vars in var dumps. 366 | Use the 'fixed' font on unix by default. 367 | 368 | 2002-02-22 Jeff Hobbs 369 | 370 | * tkcon.tcl (AddSlaveHistory): changed history to not add the 371 | command if it is the same as the previous command (it will still 372 | be evaluated). (soderstrom) 373 | Added panedwindow and labelframe as recognized Tk commands. 374 | 375 | 2002-01-24 Jeff Hobbs 376 | 377 | **** TKCON 2.3 RELEASE **** 378 | 379 | * tkcon.tcl: bumped to v2.3 380 | 381 | 2002-01-23 Jeff Hobbs 382 | 383 | * docs/procs.html: 384 | * tkcon.tcl (what): changed to differentiate between 'array' and 385 | 'scalar' instead of just returning 'variable'. 386 | (which): called what in uplevel to get scope right. 387 | 388 | 2002-01-22 Jeff Hobbs 389 | 390 | * tkcon.tcl (ExpandPathname): use a safer regsub to first unescape 391 | the str, then to protect it in the glob. 392 | (dir): Use -directory arg in 8.3+ for better results. 393 | 394 | * docs/idebug.html: added note about ? help at debug prompt. 395 | 396 | * tkcon.tcl (dir): prevented possible 'divide by zero' error. 397 | [Bug #496584] 398 | (Expand*): fixed ExpandPathname to better handle spaced pathnames. 399 | [Bug #497079] 400 | 401 | 2001-12-14 Jeff Hobbs 402 | 403 | * tkcon.tcl: 'tkcon show' causes loss of focus on Windows, so an 404 | extra focus to the console was added. 405 | 406 | 2001-12-12 Jeff Hobbs 407 | 408 | * tkcon.tcl (EvalSocketEvent): changed EvalSocketClosed to only 409 | occur after gets, then eof check. (Gerold Jury) 410 | 411 | 2001-11-14 Jeff Hobbs 412 | 413 | * tkcon.tcl: added catch around file type call 414 | 415 | 2001-10-14 Jeff Hobbs 416 | 417 | * tkcon.tcl (Init): corrected loading of rcfile when it was in a 418 | path including spaces. (siltberg) 419 | (About): clarified CVS info in about box. 420 | 421 | * docs/start.html: correct old refs to TKCON var. 422 | 423 | 2001-09-28 Jeff Hobbs 424 | 425 | * tkcon.tcl (ExpandPathname): recognize NT as a case *in*sensitive 426 | file system for pathname expansion. 427 | 428 | 2001-08-31 Jeff Hobbs 429 | 430 | * tkcon.tcl (InitSlave): propagate auto_path from master to slave. 431 | 432 | 2001-08-24 Jeff Hobbs 433 | 434 | * tkcon.tcl (NewSocket, NewDisplay): when nothing is specified, 435 | just return. 436 | (Display): fixed connecting to interps on other displays. 437 | 438 | 2001-08-22 Jeff Hobbs 439 | 440 | * docs/bindings.html: noted ^r/^s change. 441 | 442 | * tkcon.tcl (Event): changed event ^r/^s searching to search for 443 | any matching substring, and blink the substring. 444 | Added statusbar, default off (not much in status yet). 445 | 446 | 2001-08-20 Jeff Hobbs 447 | 448 | * tkcon.tcl (EvalNamespace): fixed to work when attached to a 449 | foreign interpreter. [Bug #453431] 450 | Added fix that allows access to Tk privates in 8.4. Still needs 451 | a long-term fix. [Bug #450865] (porter) 452 | 453 | 2001-08-03 Jeff Hobbs 454 | 455 | * tkcon.tcl (EvalCmd): protected against non-existent 456 | tkPriv(mouseMoved) variable 457 | 458 | 2001-07-05 Jeff Hobbs 459 | 460 | * tkcon.tcl (RetrieveFilter, RetrieveAuthentication): added 461 | support for retrieving latest tkcon via a proxy. (Thoyts) 462 | 463 | 2001-07-04 Jeff Hobbs 464 | 465 | * tkcon.tcl (tkcon): made tkcon console return whatever result it 466 | received. Fixed Bug #438281. 467 | 468 | 2001-06-20 Jeff Hobbs 469 | 470 | TKCON 2.2 RELEASE 471 | 472 | * README.txt: 473 | * index.html: 474 | * docs/index.html: updated for 2.2 release 475 | 476 | * tkcon.tcl (InitUI): moved wm protocol inside check to not run 477 | under plugin. 478 | (::tkcon::Retrieve): added a new method to allow tkcon to retrieve 479 | the latest version of itself. 480 | 481 | 2001-06-19 Jeff Hobbs 482 | 483 | * tkcon.tcl (dir): added fallback in generic dir command to not 484 | require being run in tkcon. 485 | (Init): Changed around how all options are initialized to allow 486 | for tkcon embedders to set their own defaults. Added a usehistory 487 | PRIV key that tells us whether to load/save history files. Added 488 | showOnStartup PRIV key to control whether tkcon should deiconify 489 | itself on startup. Changed setting root to .tkcon to ensure that 490 | root was just . before. 491 | 492 | 2001-06-18 Jeff Hobbs 493 | 494 | * tkcon.tcl: (InitUI) added WM_DELETE_WINDOW hook to exit to 495 | correctly deconstruct slave consoles. 496 | (tkcon congets/getc) added tkcon show to ensure that tkcon would 497 | be displayed when input is expected. 498 | (GetSelection) new command to handle getting selection, this 499 | supports the new UTF8_STRING type. 500 | (InitMenus) added version check around Attach to Socket menu, as 501 | 8.3 is need for the file channels call. 502 | 503 | 2001-05-28 Jeff Hobbs 504 | 505 | * docs/start.html: added note about ::tkcon::OPT(gets) var. 506 | * docs/tkcon.html: improved docs for tkcon *get* methods. 507 | * tkcon.tcl: reinstituted override of gets by default to use the 508 | tkcon console based gets. 509 | 510 | * tkcon.tcl (dump): corrected outputting local vars with dump. 511 | Added RCS info to PRIV array and About box. 512 | (tkcon congets) corrected congets to set the limit and insert 513 | properly to return data without needing to call the prompt. 514 | (tkcon set) corrected to return [array get] string for arrays, 515 | and scalar value for vars. 516 | Placed exact level value to all calls to uplevel and upvar. 517 | 518 | 2001-05-17 Jeff Hobbs 519 | 520 | * tkcon.tcl: make check for actual tkcon root existence to allow 521 | for setting the var ($::tkcon::PRIV(root)) in controlling apps to 522 | better control the root window. 523 | 524 | 2001-05-04 Jeff Hobbs 525 | 526 | TKCON 2.1 RELEASE 527 | 528 | * docs/style.css: new file for html files to use. 529 | * README.txt: 530 | * index.html: 531 | * doc/*: updated for 2.1 release. 532 | 533 | * tkcon.tcl: allowed 'tkcon font ...' and 'tkcon buffer ...' to 534 | work before the main console have been created. 535 | Changed "TkCon" -> "tkcon", updated for new release. 536 | 537 | 2001-03-28 Jeff Hobbs 538 | 539 | * tkcon.tcl (::tkcon::Init): added safe interp check around 'cd' 540 | call for Macs 541 | 542 | 2000-10-30 Jeff Hobbs 543 | 544 | * tkcon.tcl (dir): fixed bug where permissions wouldn't print 545 | correctly if user had no permissions. (kuchler) 546 | 547 | 2000-10-18 Jeff Hobbs 548 | 549 | * tkcon.tcl (::tkcon::NamespacesList): corrected to not use window 550 | starting with an uppercase letter (error). (reins) 551 | 552 | 2000-09-27 Jeff Hobbs 553 | 554 | * tkcon.tcl (::tkcon::About): added 'variable COLOR' decl (Zaers). 555 | 556 | 2000-09-20 Jeff Hobbs 557 | 558 | * tkcon.tcl (InitMenus): restricted the Attach Socket 559 | functionality to Tcl 8.3+ due to use of [file channels]. 560 | (InitUI): fixed Configure binding to use correct namespace for OPT 561 | (EvalSocket, EvalSend, EvalAttached): cleaned up to require that 562 | they accept only one arg as the command string to be evaluated. 563 | Prior behavior left some ambiguity as to what was eval'ed where. 564 | EvalOther, EvalSlave may need some sanitation as well. 565 | (EvalCmd): Changed EvalSocket functionality to have the \'s 566 | substituted before sending data, to allow for special chars to be 567 | added to the string. 568 | 569 | 2000-09-19 Jeff Hobbs 570 | 571 | * tkcon.tcl (::tkcon::InitUI): corrected plugin handling, as 'wm 572 | withdraw' worked, but 'wm deiconify' was disallowed. 573 | 574 | * docs/plugin.html: updated link to plugin source 575 | * docs/changes.txt: noted that changes.txt is no longer updated in 576 | favor of this ChangeLog 577 | 578 | * index.html: updated page with sourceforge links 579 | * index.html: added toplevel html index doc 580 | 581 | * tkcon.tcl: updated v2.0 to v2.1 alpha version 582 | All tkcon procedures have been namespaced, except for the ones 583 | that are visible to the user. TkCon has added the ability to 584 | attach to other displays or a socket. 585 | 586 | * tkcon.tcl: updated v1.6 to v2.0 version, tagged tkcon-2-0 587 | This is the first version to require 8.0+ to run, although it 588 | will still connect to older interps. 589 | 590 | * tkcon.tcl: updated v1.5 to v1.6 version, tagged tkcon-1-6 591 | * tkcon.tcl: updated v1.4 to v1.5 version, tagged tkcon-1-5 592 | * tkcon.tcl: updated v1.3 to v1.4 version, tagged tkcon-1-4 593 | * tkcon.tcl: updated v1.2 to v1.3 version, tagged tkcon-1-3 594 | * tkcon.tcl: updated v1.1 to v1.2 version, tagged tkcon-1-2 595 | * tkcon.tcl: updated v1.03 to v1.1 version, tagged tkcon-1-1 596 | * tkcon.tcl: updated v1.02 to v1.03 version, tagged tkcon-1-03 597 | * tkcon.tcl: updated v0.71 to v1.02 version, tagged tkcon-1-02 598 | * tkcon.tcl: updated v0.69 to v0.71 version, tagged tkcon-0-71 599 | * tkcon.tcl: updated v0.68 to v0.69 version, tagged tkcon-0-69 600 | * tkcon.tcl: updated v0.67 to v0.68 version, tagged tkcon-0-68 601 | * tkcon.tcl: updated v0.66 to v0.67 version, tagged tkcon-0-67 602 | * tkcon.tcl: updated v0.65 to v0.66 version, tagged tkcon-0-66 603 | * tkcon.tcl: updated v0.64 to v0.65 version, tagged tkcon-0-65 604 | * tkcon.tcl: updated v0.63 to v0.64 version, tagged tkcon-0-64 605 | * tkcon.tcl: updated v0.52 to v0.63 version, tagged tkcon-0-63 606 | 607 | * ChangeLog: added a ChangeLog 608 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in -- 2 | # 3 | # This file is a Makefile for Sample TEA Extension. If it has the name 4 | # "Makefile.in" then it is a template for a Makefile; to generate the 5 | # actual Makefile, run "./configure", which is a configuration script 6 | # generated by the "autoconf" program (constructs like "@foo@" will get 7 | # replaced in the actual Makefile. 8 | # 9 | # Copyright (c) 1999 Scriptics Corporation. 10 | # Copyright (c) 2002-2005 ActiveState Corporation. 11 | # 12 | # See the file "license.terms" for information on usage and redistribution 13 | # of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 | 15 | #======================================================================== 16 | # Add additional lines to handle any additional AC_SUBST cases that 17 | # have been added in a customized configure script. 18 | #======================================================================== 19 | 20 | #SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@ 21 | 22 | #======================================================================== 23 | # Nothing of the variables below this line should need to be changed. 24 | # Please check the TARGETS section below to make sure the make targets 25 | # are correct. 26 | #======================================================================== 27 | 28 | #======================================================================== 29 | # The names of the source files is defined in the configure script. 30 | # The object files are used for linking into the final library. 31 | # This will be used when a dist target is added to the Makefile. 32 | # It is not important to specify the directory, as long as it is the 33 | # $(srcdir) or in the generic, win or unix subdirectory. 34 | #======================================================================== 35 | 36 | PKG_SOURCES = @PKG_SOURCES@ 37 | PKG_OBJECTS = @PKG_OBJECTS@ 38 | 39 | PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 40 | PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 41 | 42 | #======================================================================== 43 | # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 44 | # this package that need to be installed, if any. 45 | #======================================================================== 46 | 47 | PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 48 | 49 | #======================================================================== 50 | # This is a list of public header files to be installed, if any. 51 | #======================================================================== 52 | 53 | PKG_HEADERS = @PKG_HEADERS@ 54 | 55 | #======================================================================== 56 | # "PKG_LIB_FILE" refers to the library (dynamic or static as per 57 | # configuration options) composed of the named objects. 58 | #======================================================================== 59 | 60 | PKG_LIB_FILE = @PKG_LIB_FILE@ 61 | PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 62 | 63 | lib_BINARIES = $(PKG_LIB_FILE) 64 | BINARIES = $(lib_BINARIES) 65 | 66 | SHELL = @SHELL@ 67 | 68 | srcdir = @srcdir@ 69 | prefix = @prefix@ 70 | exec_prefix = @exec_prefix@ 71 | 72 | bindir = @bindir@ 73 | libdir = @libdir@ 74 | includedir = @includedir@ 75 | datarootdir = @datarootdir@ 76 | datadir = @datadir@ 77 | mandir = @mandir@ 78 | 79 | DESTDIR = 80 | 81 | PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 82 | pkgdatadir = $(datadir)/$(PKG_DIR) 83 | pkglibdir = $(libdir)/$(PKG_DIR) 84 | pkgincludedir = $(includedir)/$(PKG_DIR) 85 | 86 | top_builddir = @abs_top_builddir@ 87 | 88 | INSTALL_OPTIONS = 89 | INSTALL = @INSTALL@ $(INSTALL_OPTIONS) 90 | INSTALL_DATA_DIR = ${INSTALL} -d -m 755 91 | INSTALL_DATA = @INSTALL_DATA@ 92 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 93 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 94 | INSTALL_LIBRARY = ${INSTALL_DATA} 95 | 96 | PACKAGE_NAME = @PACKAGE_NAME@ 97 | PACKAGE_VERSION = @PACKAGE_VERSION@ 98 | CC = @CC@ 99 | CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 100 | CFLAGS_WARNING = @CFLAGS_WARNING@ 101 | EXEEXT = @EXEEXT@ 102 | LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 103 | MAKE_LIB = @MAKE_LIB@ 104 | MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 105 | MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 106 | MAKE_STUB_LIB = @MAKE_STUB_LIB@ 107 | OBJEXT = @OBJEXT@ 108 | RANLIB = @RANLIB@ 109 | RANLIB_STUB = @RANLIB_STUB@ 110 | SHLIB_CFLAGS = @SHLIB_CFLAGS@ 111 | SHLIB_LD = @SHLIB_LD@ 112 | SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 113 | STLIB_LD = @STLIB_LD@ 114 | #TCL_DEFS = @TCL_DEFS@ 115 | TCL_BIN_DIR = @TCL_BIN_DIR@ 116 | TCL_SRC_DIR = @TCL_SRC_DIR@ 117 | #TK_BIN_DIR = @TK_BIN_DIR@ 118 | #TK_SRC_DIR = @TK_SRC_DIR@ 119 | 120 | # Not used, but retained for reference of what libs Tcl required 121 | #TCL_LIBS = @TCL_LIBS@ 122 | 123 | #======================================================================== 124 | # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 125 | # package without installing. The other environment variables allow us 126 | # to test against an uninstalled Tcl. Add special env vars that you 127 | # require for testing here (like TCLX_LIBRARY). 128 | #======================================================================== 129 | 130 | EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 131 | #EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR) 132 | TCLLIBPATH = $(top_builddir) 133 | TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` 134 | PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 135 | PATH="$(EXTRA_PATH):$(PATH)" \ 136 | TCLLIBPATH="$(TCLLIBPATH)" 137 | 138 | TCLSH_PROG = @TCLSH_PROG@ 139 | TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG) 140 | 141 | #WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` 142 | #WISH_PROG = @WISH_PROG@ 143 | #WISH = $(TCLSH_ENV) $(WISH_ENV) $(PKG_ENV) $(WISH_PROG) 144 | 145 | SHARED_BUILD = @SHARED_BUILD@ 146 | 147 | INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 148 | #INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@ 149 | 150 | PKG_CFLAGS = @PKG_CFLAGS@ 151 | 152 | # TCL_DEFS is not strictly need here, but if you remove it, then you 153 | # must make sure that configure.ac checks for the necessary components 154 | # that your library may use. TCL_DEFS can actually be a problem if 155 | # you do not compile with a similar machine setup as the Tcl core was 156 | # compiled with. 157 | #DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 158 | DEFS = @DEFS@ $(PKG_CFLAGS) 159 | 160 | # Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile 161 | CONFIG_CLEAN_FILES = Makefile 162 | CLEANFILES = @CLEANFILES@ 163 | 164 | CPPFLAGS = @CPPFLAGS@ 165 | LIBS = @PKG_LIBS@ @LIBS@ 166 | AR = @AR@ 167 | CFLAGS = @CFLAGS@ 168 | COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) \ 169 | $(CFLAGS_DEFAULT) $(CFLAGS_WARNING) $(SHLIB_CFLAGS) $(CFLAGS) 170 | 171 | GDB = gdb 172 | VALGRIND = valgrind 173 | VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \ 174 | --leak-check=yes --show-reachable=yes -v 175 | 176 | .SUFFIXES: .c .$(OBJEXT) 177 | 178 | #======================================================================== 179 | # Start of user-definable TARGETS section 180 | #======================================================================== 181 | 182 | #======================================================================== 183 | # TEA TARGETS. Please note that the "libraries:" target refers to platform 184 | # independent files, and the "binaries:" target includes executable programs and 185 | # platform-dependent libraries. Modify these targets so that they install 186 | # the various pieces of your package. The make and install rules 187 | # for the BINARIES that you specified above have already been done. 188 | #======================================================================== 189 | 190 | all: binaries libraries doc 191 | 192 | #======================================================================== 193 | # The binaries target builds executable programs, Windows .dll's, unix 194 | # shared/static libraries, and any other platform-dependent files. 195 | # The list of targets to build for "binaries:" is specified at the top 196 | # of the Makefile, in the "BINARIES" variable. 197 | #======================================================================== 198 | 199 | binaries: $(BINARIES) 200 | 201 | libraries: 202 | 203 | #======================================================================== 204 | # Your doc target should differentiate from doc builds (by the developer) 205 | # and doc installs (see install-doc), which just install the docs on the 206 | # end user machine when building from source. 207 | #======================================================================== 208 | 209 | doc: 210 | @echo "If you have documentation to create, place the commands to" 211 | @echo "build the docs in the 'doc:' target. For example:" 212 | @echo " xml2nroff sample.xml > sample.n" 213 | @echo " xml2html sample.xml > sample.html" 214 | 215 | install: all install-binaries install-libraries #install-doc 216 | 217 | install-binaries: binaries install-lib-binaries install-bin-binaries 218 | 219 | #======================================================================== 220 | # This rule installs platform-independent files, such as header files. 221 | # The list=...; for p in $$list handles the empty list case x-platform. 222 | #======================================================================== 223 | 224 | install-libraries: libraries 225 | @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 226 | @echo "Installing header files in $(DESTDIR)$(includedir)" 227 | @list='$(PKG_HEADERS)'; for i in $$list; do \ 228 | echo "Installing $(srcdir)/$$i" ; \ 229 | $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 230 | done; 231 | 232 | #======================================================================== 233 | # Install documentation. Unix manpages should go in the $(mandir) 234 | # directory. 235 | #======================================================================== 236 | 237 | install-doc: doc 238 | @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 239 | @echo "Installing documentation in $(DESTDIR)$(mandir)" 240 | @list='$(srcdir)/doc/*.n'; for i in $$list; do \ 241 | echo "Installing $$i"; \ 242 | $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 243 | done 244 | 245 | test: binaries libraries 246 | $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) \ 247 | -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \ 248 | [list load `@CYGPATH@ $(PKG_LIB_FILE)` $(PACKAGE_NAME)]" 249 | 250 | shell: binaries libraries 251 | @$(TCLSH) $(SCRIPT) 252 | 253 | gdb: 254 | $(TCLSH_ENV) $(PKG_ENV) $(GDB) $(TCLSH_PROG) $(SCRIPT) 255 | 256 | gdb-test: binaries libraries 257 | $(TCLSH_ENV) $(PKG_ENV) $(GDB) \ 258 | --args $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \ 259 | $(TESTFLAGS) -singleproc 1 \ 260 | -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \ 261 | [list load `@CYGPATH@ $(PKG_LIB_FILE)` $(PACKAGE_NAME)]" 262 | 263 | valgrind: binaries libraries 264 | $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) \ 265 | `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 266 | 267 | valgrindshell: binaries libraries 268 | $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) 269 | 270 | depend: 271 | 272 | #======================================================================== 273 | # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 274 | # mentioned above. That will ensure that this target is built when you 275 | # run "make binaries". 276 | # 277 | # The $(PKG_OBJECTS) objects are created and linked into the final 278 | # library. In most cases these object files will correspond to the 279 | # source files above. 280 | #======================================================================== 281 | 282 | $(PKG_LIB_FILE): $(PKG_OBJECTS) 283 | -rm -f $(PKG_LIB_FILE) 284 | ${MAKE_LIB} 285 | $(RANLIB) $(PKG_LIB_FILE) 286 | 287 | $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 288 | -rm -f $(PKG_STUB_LIB_FILE) 289 | ${MAKE_STUB_LIB} 290 | $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 291 | 292 | #======================================================================== 293 | # We need to enumerate the list of .c to .o lines here. 294 | # 295 | # In the following lines, $(srcdir) refers to the toplevel directory 296 | # containing your extension. If your sources are in a subdirectory, 297 | # you will have to modify the paths to reflect this: 298 | # 299 | # sample.$(OBJEXT): $(srcdir)/generic/sample.c 300 | # $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 301 | # 302 | # Setting the VPATH variable to a list of paths will cause the makefile 303 | # to look into these paths when resolving .c to .obj dependencies. 304 | # As necessary, add $(srcdir):$(srcdir)/compat:.... 305 | #======================================================================== 306 | 307 | VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx 308 | 309 | .c.@OBJEXT@: 310 | $(COMPILE) -c `@CYGPATH@ $<` -o $@ 311 | 312 | #======================================================================== 313 | # Distribution creation 314 | # You may need to tweak this target to make it work correctly. 315 | #======================================================================== 316 | 317 | #COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 318 | COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 319 | DIST_ROOT = /tmp/dist 320 | DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 321 | 322 | DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644 323 | DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755 324 | 325 | dist-clean: 326 | rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 327 | 328 | dist: dist-clean 329 | $(INSTALL_DATA_DIR) $(DIST_DIR) 330 | 331 | # TEA files 332 | $(DIST_INSTALL_DATA) $(srcdir)/Makefile.in \ 333 | $(srcdir)/aclocal.m4 $(srcdir)/configure.ac \ 334 | $(DIST_DIR)/ 335 | $(DIST_INSTALL_SCRIPT) $(srcdir)/configure $(DIST_DIR)/ 336 | 337 | $(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig 338 | $(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \ 339 | $(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \ 340 | $(DIST_DIR)/tclconfig/ 341 | 342 | # Extension files 343 | $(DIST_INSTALL_DATA) \ 344 | $(srcdir)/ChangeLog \ 345 | $(srcdir)/README.sha \ 346 | $(srcdir)/license.terms \ 347 | $(srcdir)/README \ 348 | $(srcdir)/pkgIndex.tcl.in \ 349 | $(DIST_DIR)/ 350 | 351 | list='demos doc generic library mac tests unix win'; \ 352 | for p in $$list; do \ 353 | if test -d $(srcdir)/$$p ; then \ 354 | $(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \ 355 | $(DIST_INSTALL_DATA) $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \ 356 | fi; \ 357 | done 358 | 359 | (cd $(DIST_ROOT); $(COMPRESS);) 360 | 361 | #======================================================================== 362 | # End of user-definable section 363 | #======================================================================== 364 | 365 | #======================================================================== 366 | # Don't modify the file to clean here. Instead, set the "CLEANFILES" 367 | # variable in configure.ac 368 | #======================================================================== 369 | 370 | clean: 371 | -test -z "$(BINARIES)" || rm -f $(BINARIES) 372 | -rm -f *.$(OBJEXT) core *.core 373 | -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 374 | 375 | distclean: clean 376 | -rm -f *.tab.c 377 | -rm -f $(CONFIG_CLEAN_FILES) 378 | -rm -f config.cache config.log config.status 379 | 380 | #======================================================================== 381 | # Install binary object libraries. On Windows this includes both .dll and 382 | # .lib files. Because the .lib files are not explicitly listed anywhere, 383 | # we need to deduce their existence from the .dll file of the same name. 384 | # Library files go into the lib directory. 385 | # In addition, this will generate the pkgIndex.tcl 386 | # file in the install location (assuming it can find a usable tclsh shell) 387 | # 388 | # You should not have to modify this target. 389 | #======================================================================== 390 | 391 | install-lib-binaries: binaries 392 | @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 393 | @list='$(lib_BINARIES)'; for p in $$list; do \ 394 | if test -f $$p; then \ 395 | echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 396 | $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 397 | ext=`echo $$p|sed -e "s/.*\.//"`; \ 398 | if test "x$$ext" = "xdll"; then \ 399 | lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 400 | if test -f $$lib; then \ 401 | echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 402 | $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 403 | fi; \ 404 | fi; \ 405 | fi; \ 406 | done 407 | @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 408 | if test -f $(srcdir)/$$p; then \ 409 | destp=`basename $$p`; \ 410 | echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 411 | $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 412 | fi; \ 413 | done 414 | @if test "x$(SHARED_BUILD)" = "x1"; then \ 415 | echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 416 | $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 417 | fi 418 | 419 | #======================================================================== 420 | # Install binary executables (e.g. .exe files and dependent .dll files) 421 | # This is for files that must go in the bin directory (located next to 422 | # wish and tclsh), like dependent .dll files on Windows. 423 | # 424 | # You should not have to modify this target, except to define bin_BINARIES 425 | # above if necessary. 426 | #======================================================================== 427 | 428 | install-bin-binaries: binaries 429 | @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 430 | @list='$(bin_BINARIES)'; for p in $$list; do \ 431 | if test -f $$p; then \ 432 | echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 433 | $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 434 | fi; \ 435 | done 436 | 437 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 438 | cd $(top_builddir) \ 439 | && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 440 | 441 | uninstall-binaries: 442 | list='$(lib_BINARIES)'; for p in $$list; do \ 443 | rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 444 | done 445 | list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 446 | p=`basename $$p`; \ 447 | rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 448 | done 449 | list='$(bin_BINARIES)'; for p in $$list; do \ 450 | rm -f $(DESTDIR)$(bindir)/$$p; \ 451 | done 452 | 453 | .PHONY: all binaries clean depend distclean doc install libraries test 454 | .PHONY: gdb gdb-test valgrind valgrindshell 455 | 456 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 457 | # Otherwise a system limit (for SysV at least) may be exceeded. 458 | .NOEXPORT: 459 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | WHAT: Enhanced Tk Console for all Tk platforms V2.7.10 2 | 3 | WHERE: http://tkcon.sourceforge.net/ 4 | http://www.purl.org/net/hobbs/tcl/script/ 5 | https://github.com/KarlCHansen/tkcon 6 | 7 | REQUIREMENTS: Tcl/Tk 8.4+ 8 | Tested through Tcl/Tk 8.6. 9 | tkcon is all Tcl/Tk code, no compiling required 10 | 11 | tkcon is a replacement for the standard console that comes with Tk (on 12 | Windows/Mac, but also works on Unix). tkcon provides many more features 13 | than the standard console and works on all platforms where Tcl/Tk is 14 | available. It is meant primarily to aid one when working with the little 15 | details inside tcl and tk and to give Unix users the GUI console provided 16 | by default in the Mac and Windows Tk. 17 | 18 | FEATURES: 19 | Command history 20 | Path (Unix style) / Proc / Variable name expansion 21 | Multiple and tabbed consoles, each with its own state (via multiple 22 | interpreters) 23 | Captures stdout and stderr to console window (puts overridden) 24 | Hot errors (click on error result to see stack trace) 25 | Electric character matching (a la emacs) 26 | Electric proc highlighting 27 | Enhanced history searching 28 | Configurable 29 | Cut / Copy / Paste between windows (interoperates with native platform) 30 | Communication between consoles and other Tk interpreters 31 | (including non-tcl ones) 32 | Works on all Tk platforms 33 | 34 | CHANGES: 35 | V2.7.10 kch Cloned the latest version I could find. Development has 36 | stalled on this for several years. This adds the classic 37 | web-browser "ctrl-plus" and "ctrl-minus" handlers to change 38 | the font size. I needed these because I started working on 39 | 2K and 4K monitors and the default font sizes were far too 40 | small to read. Note that the menus on Win10 are rendured 41 | with the native menuing system, so without major rewrite 42 | the menus cannot be resized. 43 | 44 | CONTACT: Jeffrey Hobbs, jeff at hobbs dot org 45 | kch, Karl Hansen, karlhansen1425 -at- gee-male daught com 46 | 47 | GETTING STARTED: 48 | 49 | tkcon is a single drop-in file. On Windows, I place this on the desktop 50 | and double-click on it instead of wish/tclsh. On Unix and OS X, I place it 51 | in a directory on my path and run this instead of wish. 52 | 53 | Documentation can be reading by starting with index.html in the docs/ 54 | subdirectory. Happying Tcl'ing! 55 | -------------------------------------------------------------------------------- /aclocal.m4: -------------------------------------------------------------------------------- 1 | # 2 | # Include the TEA standard macro set 3 | # 4 | 5 | builtin(include,tclconfig/tcl.m4) 6 | 7 | # 8 | # Add here whatever m4 macros you want to define for your package 9 | # 10 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | #!/bin/bash -norc 2 | dnl This file is an input file used by the GNU "autoconf" program to 3 | dnl generate the file "configure", which is run during Tcl installation 4 | dnl to configure the system for the local environment. 5 | 6 | #----------------------------------------------------------------------- 7 | # Sample configure.ac for Tcl Extensions. The only places you should 8 | # need to modify this file are marked by the string __CHANGE__ 9 | #----------------------------------------------------------------------- 10 | 11 | #----------------------------------------------------------------------- 12 | # __CHANGE__ 13 | # Set your package name and version numbers here. 14 | # 15 | # This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION 16 | # set as provided. These will also be added as -D defs in your Makefile 17 | # so you can encode the package version directly into the source files. 18 | # This will also define a special symbol for Windows (BUILD_ 19 | # so that we create the export library with the dll. 20 | #----------------------------------------------------------------------- 21 | 22 | AC_INIT([tkcon], [2.7]) 23 | 24 | #-------------------------------------------------------------------- 25 | # Call TEA_INIT as the first TEA_ macro to set up initial vars. 26 | # This will define a ${TEA_PLATFORM} variable == "unix" or "windows" 27 | # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE. 28 | #-------------------------------------------------------------------- 29 | 30 | TEA_INIT() 31 | 32 | AC_CONFIG_AUX_DIR(tclconfig) 33 | 34 | #-------------------------------------------------------------------- 35 | # Load the tclConfig.sh file 36 | #-------------------------------------------------------------------- 37 | 38 | TEA_PATH_TCLCONFIG 39 | TEA_LOAD_TCLCONFIG 40 | 41 | #-------------------------------------------------------------------- 42 | # Load the tkConfig.sh file if necessary (Tk extension) 43 | #-------------------------------------------------------------------- 44 | 45 | TEA_PATH_TKCONFIG 46 | TEA_LOAD_TKCONFIG 47 | 48 | #----------------------------------------------------------------------- 49 | # Handle the --prefix=... option by defaulting to what Tcl gave. 50 | # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. 51 | #----------------------------------------------------------------------- 52 | 53 | TEA_PREFIX 54 | 55 | #----------------------------------------------------------------------- 56 | # Standard compiler checks. 57 | # This sets up CC by using the CC env var, or looks for gcc otherwise. 58 | # This also calls AC_PROG_CC and a few others to create the basic setup 59 | # necessary to compile executables. 60 | #----------------------------------------------------------------------- 61 | 62 | TEA_SETUP_COMPILER 63 | 64 | #----------------------------------------------------------------------- 65 | # __CHANGE__ 66 | # Specify the C source files to compile in TEA_ADD_SOURCES, 67 | # public headers that need to be installed in TEA_ADD_HEADERS, 68 | # stub library C source files to compile in TEA_ADD_STUB_SOURCES, 69 | # and runtime Tcl library files in TEA_ADD_TCL_SOURCES. 70 | # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS 71 | # and PKG_TCL_SOURCES. 72 | #----------------------------------------------------------------------- 73 | 74 | TEA_ADD_SOURCES([]) 75 | TEA_ADD_HEADERS([]) 76 | TEA_ADD_INCLUDES([]) 77 | TEA_ADD_LIBS([]) 78 | TEA_ADD_CFLAGS([]) 79 | TEA_ADD_STUB_SOURCES([]) 80 | TEA_ADD_TCL_SOURCES([tkcon.tcl]) 81 | 82 | #-------------------------------------------------------------------- 83 | # __CHANGE__ 84 | # 85 | # You can add more files to clean if your extension creates any extra 86 | # files by extending CLEANFILES. 87 | # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure 88 | # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. 89 | # 90 | # A few miscellaneous platform-specific items: 91 | # TEA_ADD_* any platform specific compiler/build info here. 92 | #-------------------------------------------------------------------- 93 | 94 | #CLEANFILES="$CLEANFILES pkgIndex.tcl" 95 | if test "${TEA_PLATFORM}" = "windows" ; then 96 | # Ensure no empty if clauses 97 | : 98 | #TEA_ADD_SOURCES([win/winFile.c]) 99 | #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) 100 | else 101 | # Ensure no empty else clauses 102 | : 103 | #TEA_ADD_SOURCES([unix/unixFile.c]) 104 | #TEA_ADD_LIBS([-lsuperfly]) 105 | fi 106 | 107 | #-------------------------------------------------------------------- 108 | # __CHANGE__ 109 | # Choose which headers you need. Extension authors should try very 110 | # hard to only rely on the Tcl public header files. Internal headers 111 | # contain private data structures and are subject to change without 112 | # notice. 113 | # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG 114 | #-------------------------------------------------------------------- 115 | 116 | #TEA_PUBLIC_TCL_HEADERS 117 | #TEA_PRIVATE_TCL_HEADERS 118 | 119 | #TEA_PUBLIC_TK_HEADERS 120 | #TEA_PRIVATE_TK_HEADERS 121 | #TEA_PATH_X 122 | 123 | #-------------------------------------------------------------------- 124 | # Check whether --enable-threads or --disable-threads was given. 125 | # This auto-enables if Tcl was compiled threaded. 126 | #-------------------------------------------------------------------- 127 | 128 | #TEA_ENABLE_THREADS 129 | 130 | #-------------------------------------------------------------------- 131 | # The statement below defines a collection of symbols related to 132 | # building as a shared library instead of a static library. 133 | #-------------------------------------------------------------------- 134 | 135 | #TEA_ENABLE_SHARED 136 | 137 | #-------------------------------------------------------------------- 138 | # This macro figures out what flags to use with the compiler/linker 139 | # when building shared/static debug/optimized objects. This information 140 | # can be taken from the tclConfig.sh file, but this figures it all out. 141 | #-------------------------------------------------------------------- 142 | 143 | #TEA_CONFIG_CFLAGS 144 | 145 | #-------------------------------------------------------------------- 146 | # Set the default compiler switches based on the --enable-symbols option. 147 | #-------------------------------------------------------------------- 148 | 149 | #TEA_ENABLE_SYMBOLS 150 | 151 | #-------------------------------------------------------------------- 152 | # This macro generates a line to use when building a library. It 153 | # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, 154 | # and TEA_LOAD_TCLCONFIG macros above. 155 | #-------------------------------------------------------------------- 156 | 157 | #TEA_MAKE_LIB 158 | 159 | #-------------------------------------------------------------------- 160 | # Determine the name of the tclsh and/or wish executables in the 161 | # Tcl and Tk build directories or the location they were installed 162 | # into. These paths are used to support running test cases only, 163 | # the Makefile should not be making use of these paths to generate 164 | # a pkgIndex.tcl file or anything else at extension build time. 165 | #-------------------------------------------------------------------- 166 | 167 | #TEA_PROG_TCLSH 168 | #TEA_PROG_WISH 169 | 170 | #-------------------------------------------------------------------- 171 | # Setup a *Config.sh.in configuration file. 172 | #-------------------------------------------------------------------- 173 | 174 | #TEA_EXPORT_CONFIG([sample]) 175 | #AC_SUBST(SAMPLE_VAR) 176 | 177 | #-------------------------------------------------------------------- 178 | # Specify files to substitute AC variables in. You may alternatively 179 | # have a special pkgIndex.tcl.in or other files which require 180 | # substituting the AC variables in. Include these here. 181 | #-------------------------------------------------------------------- 182 | 183 | AC_CONFIG_FILES([Makefile]) 184 | #AC_CONFIG_FILES([sampleConfig.sh]) 185 | 186 | #-------------------------------------------------------------------- 187 | # Finally, substitute all of the various values into the files 188 | # specified with AC_CONFIG_FILES. 189 | #-------------------------------------------------------------------- 190 | 191 | AC_OUTPUT() 192 | -------------------------------------------------------------------------------- /docs/bindings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Special Bindings 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Special Bindings 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | Most of the bindings are the same as for the Text widget. Some have been 60 | modified to make sure that the integrity of the console is maintained. 61 | Others have been added to enhance the usefulness of the console. Only 62 | the modified or new bindings are listed here. 63 |

64 | 65 |

66 |
Control-x or Cut (on Sparc5 keyboards) 67 |
Cut 68 |
Control-c or Copy (on Sparc5 keyboards) 69 |
Copy 70 |
Control-v or Paste (on Sparc5 keyboards) 71 |
Paste 72 |
Insert 73 |
Insert (duh). 74 |

75 |

Up 76 |
Goes up one level in the commands line history when cursor is on the 77 | prompt line, otherwise it moves through the buffer 78 |
Down 79 |
Goes down one level in the commands line history when cursor is on the 80 | last line of the buffer, otherwise it moves through the buffer 81 |
Control-p 82 |
Goes up one level in the commands line history 83 |
Control-n 84 |
Goes down one level in the commands line history 85 |

86 |

Tab 87 |
Tries to expand file path names, then variable names, then proc names. 88 |
Escape 89 |
Tries to expand file path names. 90 |
Control-P 91 |
Tries to expand procedure names. The procedure names will be those 92 | that are actually in the attached interpreter (unless nontcl is specified, 93 | in which case it always does the lookup in the default slave interpreter). 94 |
Control-V 95 |
Tries to expand variable names (those returned by [info vars]). 96 | It's search behavior is like that for procedure names. 97 |

98 |

Return or Enter 99 |
Evaluates the current command line if it is a complete command, 100 | otherwise it just goes to a new line 101 |
Control-a 102 |
Go to the beginning of the current command line 103 |
Control-l 104 |
Clear the entire console buffer 105 |
Control-r 106 |
Searches backwards in the history for any command that contains the 107 | string in the current command line. Repeatable to search farther back. 108 | The matching substring off the found command will blink. 109 |
Control-s 110 |
As above, but searches forward (only useful if you searched too far back). 111 |
Control-t 112 |
Transposes characters 113 |
Control-u 114 |
Clear the current command line 115 |
Control-z 116 |
Saves current command line in a buffer that can be retrieved with 117 | another Control-z. If the current command line is empty, then any 118 | saved command is retrieved without being overwritten, otherwise the 119 | current contents get swapped with what's in the saved command buffer. 120 |

121 |

Control-Key-1 122 |
Attaches console to the console's slave interpreter 123 |
Control-Key-2 124 |
Attaches console to the console's master interpreter 125 |
Control-Key-3 126 |
Attaches console to main TkCon interpreter 127 |
Control-A 128 |
Pops up the "About" dialog 129 |
Control-N 130 |
Creates a new console. Each console has separate state, including 131 | it's own widget hierarchy (it's a slave interpreter). 132 |
Control-q 133 |
Close the current console OR Quit the program (depends on the value 134 | of TKCON(slaveexit)). 135 |
Control-w 136 |
Closes the current console. Closing the main console will exit the 137 | program (something has to control all the slaves...) 138 |
139 | 140 | TkCon also has electric bracing (similar to that in emacs). It will 141 | highlight matching pairs of {}'s, []'s, ()'s and ""'s. For the first three, 142 | if there is no matching left element for the right, then it blinks the 143 | entire current command line. For the double quote, if there is no proper 144 | match then it just blinks the current double quote character. It does 145 | properly recognize most escaping (except escaped escapes), but does not look 146 | for commenting (why would you interactively put comments in?). 147 |
148 |
149 | 150 |
151 |
© Jeffrey Hobbs
152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /docs/demopic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjoye/tkcon/9acf6d9c35f71721017c1aa5c887389431dca8ca/docs/demopic.png -------------------------------------------------------------------------------- /docs/dump.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: dump procedure 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: dump procedure 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | The dump command provides a way for the user to spit out 60 | state information about the interpreter in a Tcl readable (and human 61 | readable) form. It takes the general form: 62 | 63 |

64 | dump method ?-nocomplain? ?-filter pattern? ?--? 65 | pattern ?pattern ...? 66 |
67 | 68 | The patterns represent glob-style patterns (as in string match pattern 69 | $str). -nocomplain will prevent dump from 70 | throwing an error if no items matched the pattern. -filter is 71 | interpreted as appropriate for the method. The various methods are: 72 | 73 |
74 | 75 |
dump command args 76 |
Outputs one or more commands. 77 | 78 |
dump procedure args 79 |
Outputs one or more procs in sourceable form. 80 | 81 |
dump variable args 82 |
Outputs the values of variables in sourceable form. Recognizes nested 83 | arrays. The -filter pattern is used as to filter array element 84 | names and is interepreted as a glob pattern (defaults to {*}). 85 | It is passed down for nested arrays. 86 | 87 |
dump widget args 88 |
Outputs one or more widgets by giving their configuration options. 89 | The -filter pattern is used as to filter the config options and 90 | is interpreted as a case insensitive regexp pattern (defaults to {.*}) 91 | 92 |
93 |
94 |
95 | 96 |
97 |
© Jeffrey Hobbs
98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /docs/dump.n.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- dump manpage}] 2 | [manpage_begin dump n 2.5] 3 | [copyright {Jeffrey Hobbs }] 4 | [moddesc {TkCon}] 5 | [titledesc {Dump information about Tcl interpreter in TkCon}] 6 | 7 | [description] 8 | [para] 9 | The dump command provides a way for the user to spit out state 10 | information about the interpreter in a Tcl readable 11 | (and human readable) form. 12 | It takes the general form: 13 | 14 | [list_begin definitions] 15 | 16 | [call [cmd dump] [arg method]\ 17 | [opt [arg -nocomplain]]\ 18 | [opt [arg "-filter pattern"]]\ 19 | [opt [cmd --]]\ 20 | [arg pattern]\ 21 | [opt [arg "pattern ..."]]] 22 | 23 | [list_end] 24 | 25 | [para] 26 | The patterns represent glob-style patterns (as in [cmd string] [arg {match pattern $str}]). 27 | [arg -nocomplain] will prevent dump from throwing an error if no items 28 | matched the pattern. 29 | [arg -filter] is interpreted as appropriate for the method. 30 | The various methods are: 31 | 32 | [list_begin definitions] 33 | 34 | [def "[cmd dump] [arg command] [arg args]"] 35 | Outputs one or more commands. 36 | 37 | [def "[cmd dump] [arg procedure] [arg args]"] 38 | Outputs one or more procs in sourceable form. 39 | 40 | [def "[cmd dump] [arg variable] [arg args]"] 41 | Outputs the values of variables in sourceable form. 42 | Recognizes nested arrays. 43 | The -filter pattern is used as to filter array element 44 | names and is interepreted as a glob pattern (defaults to {*}). 45 | It is passed down for nested arrays. 46 | 47 | [def "[cmd dump] [arg widget] [arg args]"] 48 | Outputs one or more widgets by giving their configuration options. 49 | The -filter pattern is used as to filter the config options and 50 | is interpreted as a case insensitive regexp pattern (defaults to {.*}). 51 | 52 | [list_end] 53 | 54 | [see_also [cmd tkcon](1)] 55 | [see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd idebug](n)] 56 | [see_also [cmd observe](n)] 57 | [keywords Tk console dump] 58 | 59 | [manpage_end] 60 | 61 | -------------------------------------------------------------------------------- /docs/idebug.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: idebug procedure 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: idebug procedure 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | The idebug command provides an interactive debugging environment for 60 | procedures via TkCon. You can place idebug break commands 61 | into your procedure to create breakpoints. It will pop up the TkCon 62 | console and put you into a "debugging" mode. The body, show & 63 | trace methods are intended for internal use only. 64 |

65 | 66 | This procedure works for minimal debugging sessions. Comments are 67 | encouraged. 68 | 69 |

70 | 71 |
idebug body ?level? 72 |
Prints out the body of the command (if it is a procedure) at the 73 | specified level. level defaults to the current level. 74 | 75 |
idebug break ?id? 76 |
Creates a breakpoint within a procedure. This will only trigger if 77 | idebug is on and the id matches the pattern. If so, TkCon will pop to the 78 | front with the prompt changed to an idebug prompt. You are given the basic 79 | ability to observe the call stack an query/set variables or execute Tcl 80 | commands at any level. A separate history is maintained in debugging mode. 81 | To see the special commands available at the debug prompt, type ? 82 | and hit return. 83 | 84 |
idebug {echo ?id?} ?args? 85 |
Behaves just like echo, but only triggers when idebug is 86 | on. You can specify an optional id to further restrict triggering. If no 87 | id is specified, it defaults to the name of the command in which the call 88 | was made. 89 | 90 |
idebug id ?id? 91 |
Query or set the idebug id. This id is used by other idebug methods 92 | to determine if they should trigger or not. The idebug id can be a glob 93 | pattern and defaults to *. 94 | 95 |
idebug off 96 |
Turns idebug off. 97 | 98 |
idebug on ?id? 99 |
Turns idebug on. If id is specified, it sets the id to it. 100 | 101 |
idebug {puts ?id?} args 102 |
Behaves just like puts, but only triggers when idebug is 103 | on. You can specify an optional id to further restrict triggering. If no 104 | id is specified, it defaults to the name of the command in which the call 105 | was made. 106 | 107 |
idebug show type ?level? ?VERBOSE? 108 |
type must be one of vars, locals or globals. This method 109 | will output the variables/locals/globals present in a particular level. 110 | If VERBOSE is added, then it actually 'dump's out the values as well. 111 | level defaults to the level in which this method was called. 112 | 113 |
idebug trace ?level? 114 |
Prints out the stack trace from the specified level up to the top 115 | level. level defaults to the current level. 116 | 117 |
118 |
119 |
120 | 121 |
122 |
© Jeffrey Hobbs
123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /docs/idebug.n.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- idebug manpage}] 2 | [manpage_begin idebug n 2.5] 3 | [copyright {Jeffrey Hobbs }] 4 | [moddesc {TkCon}] 5 | [titledesc {Interactive debugging environment in TkCon}] 6 | 7 | [description] 8 | [para] 9 | The idebug command provides an interactive debugging 10 | environment for procedures via TkCon. 11 | You can place idebug break commands into your procedure 12 | to create breakpoints. 13 | It will pop up the TkCon console and put you into a 14 | "debugging" mode. 15 | The [arg body], [arg show] & [arg trace] methods are 16 | intended for internal use only. 17 | 18 | This procedure works for minimal debugging sessions. 19 | Comments are encouraged. 20 | 21 | [list_begin definitions] 22 | 23 | [call [cmd idebug] [arg body] [opt [arg level]]] 24 | Prints out the body of the command (if it is a procedure) 25 | at the specified level. 26 | level defaults to the current level. 27 | 28 | [call [cmd idebug] [arg break] [opt [arg id]]] 29 | Creates a breakpoint within a procedure. 30 | This will only trigger if idebug is on and the [arg id] matches the pattern. 31 | If so, TkCon will pop to the front with the prompt changed 32 | to an idebug prompt. 33 | You are given the basic ability to observe the call stack 34 | an query/set variables or execute Tcl commands at any level. 35 | A separate history is maintained in debugging mode. 36 | To see the special commands available at the debug prompt, 37 | type ? and hit return. 38 | 39 | [call [cmd idebug] \{[arg "[arg echo] [opt [arg id]]"]\} [opt [arg args]]] 40 | Behaves just like [cmd echo], but only triggers when idebug is on. 41 | You can specify an optional [arg id] to further restrict triggering. 42 | If no id is specified, it defaults to the name of the command 43 | in which the call was made. 44 | 45 | [call [cmd idebug] [arg id] [opt [arg id]]] 46 | Query or set the idebug id. 47 | This id is used by other idebug methods to determine if 48 | they should trigger or not. 49 | The idebug id can be a glob pattern and defaults to *. 50 | 51 | [call [cmd idebug] [arg off]] 52 | Turns idebug off. 53 | 54 | [call [cmd idebug] [arg on] [opt [arg id]]] 55 | Turns idebug on. 56 | If [arg id] is specified, it sets the id to it. 57 | 58 | [call [cmd idebug] \{[arg "[arg puts] [opt [arg id]]"]\} [arg args]] 59 | Behaves just like [cmd puts], but only triggers when idebug is on. 60 | You can specify an optional [arg id] to further restrict triggering. 61 | If no id is specified, it defaults to the name of the 62 | command in which the call was made. 63 | 64 | [call [cmd idebug] [arg show] [arg type] [opt [arg level]] [opt [arg VERBOSE]]] 65 | type must be one of vars, locals or globals. 66 | This method will output the variables/locals/globals present 67 | in a particular level. 68 | If [arg VERBOSE] is added, then it actually [cmd dump]s out the values as well. 69 | level defaults to the level in which this method was called. 70 | 71 | [call [cmd idebug] [arg trace] [opt [arg level]]] 72 | Prints out the stack trace from the specified level up to the top level. 73 | level defaults to the current level. 74 | 75 | [list_end] 76 | 77 | [see_also [cmd tkcon](1)] 78 | [see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] 79 | [see_also [cmd observe](n)] 80 | [keywords Tk console debug] 81 | 82 | [manpage_end] 83 | 84 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Documentation 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon Documentation (June 2001) 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 | 43 | 46 | 47 |

Release 49 | Archives (high speed server)

50 | 51 |

Screenshot

52 | 53 | Please read the following pages carefully to fully understand the 54 | features AND limitations of TkCon. I'm always open to suggestions for 55 | improvement. 56 |

57 |

58 |
59 | 60 | 61 | 62 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 |
Getting Started 63 | Special Bindingstkcon ProceduresScreenshot
dump proctkcon procidebug procobserve proc
74 | 75 |
76 | 77 |
78 |
© Jeffrey Hobbs
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/license.terms: -------------------------------------------------------------------------------- 1 | * COPYRIGHT AND LICENSE TERMS * 2 | 3 | This software is copyrighted by Jeffrey Hobbs . The 4 | following terms apply to all files associated with the software unless 5 | explicitly disclaimed in individual files. 6 | 7 | The authors hereby grant permission to use, copy, modify, distribute, and 8 | license this software and its documentation for any purpose, provided that 9 | existing copyright notices are retained in all copies and that this notice 10 | is included verbatim in any distributions. No written agreement, license, 11 | or royalty fee is required for any of the authorized uses. 12 | 13 | IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR 14 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 15 | OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, 16 | EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 17 | 18 | THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, 19 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS 21 | PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO 22 | OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR 23 | MODIFICATIONS. 24 | 25 | SPECIAL NOTES: 26 | 27 | This software is also falls under the bourbon_ware clause v2: 28 | 29 | This software is free, but should you find this software useful in your 30 | daily work and would like to compensate the author, donations in the form 31 | of aged bourbon and scotch are welcome by the author. The user may feel 32 | exempt from this clause if they are below drinking age or think the author 33 | has already partaken of too many drinks. 34 | -------------------------------------------------------------------------------- /docs/limits.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Limitations 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Limitations 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 |

Limitations:

43 | 44 | TkCon requires Tk8.4+. Since TkCon is meant to behave like the original Tk 45 | console, it does not separate itself from the environment (it does not use 46 | send to function, except when attached to foreign Tk interpreters). This 47 | means that it can be can be altered or destroyed by any sourced 48 | applications, and it will respond to an application's 'exit' call by 49 | exiting (by default, slave consoles will only close themselves instead of 50 | exiting the entire TkCon environment). However, the widget tree of TkCon 51 | is hidden from the user environment. 52 |

53 | 54 | Since TkCon is built for cross-platform capability, in 55 | Unix/Windows environments it does not have tty/shell behavior. This 56 | means programs like vi and less (those that rely 57 | on tty/shell settings) will not function appropriately (currently they may 58 | hang TkCon). Programs like ls and more will just 59 | spit output to the TkCon screen without any special control or formatting 60 | (note that ls has been rewritten for TkCon). You also do not 61 | get any job (process) control outside of what tcl normally can provide. 62 | Currently there is no way to handle stdin input. 63 |

64 | 65 | When connecting to non-Tcl Tk interpreters (ie - PerlTk, SchemeTk, ...), 66 | you must use the syntax of the target environment. See my 67 | notes on using other Tk-embedded languages for 68 | more info. 69 |

70 |
71 | 72 |
73 |
© Jeffrey Hobbs
74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /docs/nontcl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon for Non-Tcl Users 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Non-Tcl Usage 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 | This document is for those users who are trying to use TkCon with a 43 | non-Tcl based Tk language (ie - SchemeTk, PerlTk, PythonTk...). 44 |

45 | 46 | TkCon requires Tcl/Tk 8.4+ to 47 | run. However, it can attach to any language with Tk4+ 48 | embedded into it with the use of the Tk 'send' command. I have been able 49 | to succesfully talk to SchemeTk-3.0 and Perl/Tk. When using TkCon attached 50 | to these interpreters, you must remember to talk to the connected 51 | interpreter in its language. 52 |

53 | I welcome further comments from users of Tk-embedded languages on their 54 | experiences or ideas. Of course, you can always try to port TkCon in full 55 | to your language. I'd like to see the results from any such efforts. 56 |

57 | 58 |

Special Language Notes:

59 | 60 |

Perl Tk

61 | 62 | Read the man page on Perl/Tk's send command. You have to define Tk::Receive 63 | before it will work. 64 | Stephen Lidie 65 | (lusol@Turkey.CC.Lehigh.EDU) contributed 66 | a companion Perl/Tk program that does the trick with 67 | some extras. 68 |
69 |
70 | 71 |
72 |
© Jeffrey Hobbs
73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/observe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: observe procedure 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: observe procedure 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | This command provides runtime debugging output for variables and commands 60 | without the need to edit your code. For variables, the underlying mechanism 61 | uses trace and dump var. For commands, it renames 62 | the observed procedure and uses a special wrapper procedure. WARNING: using this procedure after checkpointing 64 | state will result in major problems if you clean state because the renamed 65 | (true) commands will be lost. 66 |

67 | 68 | This procedure is experimental. Comments are encouraged. 69 | 70 |

71 | 72 |
observe command cmdname ?maxlevel? 73 |
This will create a wrapper command which prints out (using 74 | dump) the call stack to the console. maxlevel 75 | represents the maximum number of levels of the call stack which will be 76 | printed (defaults to 4). 77 | 78 |
observe cdelete cmdname 79 |
Removes the wrapper around an observed command. 80 | 81 |
observe cinfo cmdname 82 |
Prints out useless info. 83 | 84 |
observe variable varname operation ?args? 85 |
Currently a wrapper around trace that uses dump to 86 | print out the value of the named variable whenever the specified operation 87 | on that variable occurs (must be read, write or unset). 88 | 89 |
observe vdelete varname operation 90 |
Deletes the trace wrapper around the named variable. 91 | 92 |
observe vinfo varname 93 |
Prints out trace info about the named variable. 94 | 95 |
96 |
97 |
98 | 99 |
100 |
© 101 | Jeffrey Hobbs
102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /docs/observe.n.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- observe manpage}] 2 | [manpage_begin observe n 2.5] 3 | [copyright {Jeffrey Hobbs }] 4 | [moddesc {TkCon}] 5 | [titledesc {Runtime debugging output in TkCon}] 6 | 7 | [description] 8 | [para] 9 | This command provides runtime debugging output for variables 10 | and commands without the need to edit your code. 11 | For variables, the underlying mechanism uses [cmd trace] and [cmd dump] var. 12 | For commands, it renames the observed procedure and uses a 13 | special wrapper procedure. 14 | WARNING: using this procedure after checkpointing state will 15 | result in major problems if you clean state because the 16 | renamed (true) commands will be lost. 17 | 18 | [para] 19 | This procedure is experimental. 20 | Comments are encouraged. 21 | 22 | [list_begin definitions] 23 | 24 | [call [cmd observe] [arg command] [arg cmdname] [opt [arg maxlevel]]] 25 | This will create a wrapper command which prints out (using [cmd dump]) 26 | the call stack to the console. 27 | maxlevel represents the maximum number of levels of the call 28 | stack which will be printed (defaults to 4). 29 | 30 | [call [cmd observe] [arg cdelete] [arg cmdname]] 31 | Removes the wrapper around an observed command. 32 | 33 | [call [cmd observe] [arg cinfo] [arg cmdname]] 34 | Prints out useless info. 35 | 36 | [call [cmd observe] [arg variable] [arg varname] [arg operation] [opt [arg args]]] 37 | Currently a wrapper around trace that uses [cmd dump] to print out 38 | the value of the named variable whenever the specified 39 | operation on that variable occurs (must be [arg read], [arg write] or [arg unset]). 40 | 41 | [call [cmd observe] [arg vdelete] [arg varname] [arg operation]] 42 | Deletes the trace wrapper around the named variable. 43 | 44 | [call [cmd observe] [arg vinfo] [arg varname]] 45 | Prints out trace info about the named variable. 46 | 47 | [list_end] 48 | 49 | [see_also [cmd tkcon](1)] 50 | [see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] 51 | [see_also [cmd idebug](n)] 52 | [keywords Tk console debug] 53 | 54 | [manpage_end] 55 | 56 | -------------------------------------------------------------------------------- /docs/perl.txt: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl -w 2 | 3 | # tkcon.pl - a Perl/Tk "shell" companion for tkcon.tcl. 4 | # 5 | # Variable $MW is an object reference to the main window, from which you can 6 | # create and manipulate child widgets. Variable names beginning with an 7 | # underscore are reserved for this application. 8 | # 9 | # Stephen O. Lidie, 96/08/25 10 | 11 | require 5.002; 12 | use English; 13 | use Tk; 14 | use Tk::Pretty qw(Pretty); 15 | use Tk::Dialog; 16 | use strict; 17 | use subs qw(doit tkcon); 18 | my($MW, $_TKCON, $_VERSION, $_HELP, $_SHELL, $_TAB, $_PARA, @_ERRORS, $_MES); 19 | 20 | tkcon; # main 21 | 22 | sub doit { 23 | 24 | # Eval some code without use strict constraints. 25 | 26 | my($code) = @ARG; 27 | 28 | { 29 | no strict; 30 | if ($_MES) { 31 | $_MES->packForget; 32 | $_MES->destroy; 33 | $_MES = 0; 34 | } 35 | @_ERRORS = (); 36 | $SIG{'__WARN__'} = sub {push @_ERRORS, @ARG}; 37 | my $_res = eval $code; 38 | push @_ERRORS, $EVAL_ERROR if $EVAL_ERROR; 39 | push @_ERRORS, $_res; 40 | } 41 | 42 | } # end doit 43 | 44 | sub tkcon { 45 | 46 | # Nothing fancy here, just create the main window and the help dialog 47 | # object, and display a pointer to the help. 48 | 49 | $_TKCON = 'tkcon.pl'; 50 | $_VERSION = '0.2'; 51 | $_SHELL = '/bin/sh'; 52 | $_SHELL = $ENV{'SHELL'} if $ENV{'SHELL'}; 53 | $_TAB = 0; 54 | $_PARA = ''; 55 | 56 | $MW = MainWindow->new; 57 | $MW->title($_TKCON); 58 | $MW->iconname($_TKCON); 59 | $_HELP = $MW->Dialog( 60 | -title => "$_TKCON Help", 61 | -font => 'fixed', 62 | -wraplength => '6i', 63 | -justify => 'left', 64 | -text => 65 | "? - this text.\n" . 66 | "| - pass arguments to your shell (default /bin/sh).\n" . 67 | "p - use Tk::Pretty to \"pretty-print\" arguments.\n" . 68 | "+ - a tab starts/stops multiline input mode.\n" . 69 | "exit - quit $_TKCON.\n" . 70 | "\nOther input is assumed to be a Perl/Tk command.\n" . 71 | "\n\$MW is the MainWindow.\n", 72 | ); 73 | $_HELP->configure(-foreground => 'blue'); 74 | $_MES = $MW->Label(-text => "\nEnter ? for help.\n")->pack; 75 | MainLoop; 76 | 77 | } # end tkcon 78 | 79 | sub Tk::Receive { 80 | 81 | shift(); 82 | $ARG = shift(); 83 | if (/^\?(.*)/) { # help 84 | $_HELP->Show; 85 | } elsif (/^\|(.*)/) { # bang 86 | @_ERRORS = (); 87 | push @_ERRORS, `$_SHELL -c $1 2>&1`; 88 | } elsif (/^\+$/) { 89 | $_TAB++; 90 | if ($_TAB % 2) { 91 | @_ERRORS = (); 92 | $_PARA = ''; 93 | push @_ERRORS, '+'; 94 | } else { 95 | doit $_PARA; 96 | } 97 | } else { # Perl/Tk command 98 | $ARG = "Pretty($1)" if (/^p\s(.*)$/); 99 | if ($_TAB % 2) { 100 | $_PARA .= $ARG; 101 | push @_ERRORS, '+'; 102 | } else { 103 | doit $ARG; 104 | } 105 | } # ifend 106 | 107 | return @_ERRORS; 108 | 109 | } # end Tk::Receive 110 | -------------------------------------------------------------------------------- /docs/plugin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Tcl Plugin Stripped Demo 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon Documentation (May 2001) 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 |

43 | This is the full tkcon script when run inside the plugin. It feels like a 44 | stripped down version of tkcon, but the only limitations are those 45 | established by the plugin. You can test the basic console features and get 46 | a feel for the mutli-color output. Below the demo are some ideas to try 47 | out. v2+ of the plugin is distributed with a megawidget version of tkcon for 48 | debugging tclets. The demo below uses the CVS head of tkcon. 49 | 50 |

51 | 57 | 58 | 59 | 60 | 61 | 69 | 70 | 71 |

72 | 73 | Have a look at some of the features: (culled from the 74 | tkcon documentation) 75 |
    76 |
  • Variable / Path / Procedure Name Expansion. Type in 77 | set tc at the prompt. Hit <Control-Shift-V>. 78 | set tcl_ should now be visible. 79 | Hit <Control-Shift-V> again. You should see the rest of 80 | the completions printed out for you. Works the same for procedures 81 | and files paths (file access restricted from plugin). Works properly 82 | when spaces or other funny characters are including in the name. 83 | 84 |
  • Command Highlighting. Note that set should be in 85 | green, denoting it is a recognized command in that interpreter. 86 | 87 |
  • Electric Character Matching. Watch while you type the 88 | following: proc foo { a b } { puts [list $a $b] }. Did you 89 | notice the blink matching of the braces? Yes, it's smart. 90 | 91 |
  • Command History. Use the Up/Down arrows or 92 | <Control-p>/<Control-n> to peruse the command 93 | history. <Control-r>/<Control-s> Actually 94 | does command history matching (like tcsh or other advanced Unix shells). 95 | 96 |
  • Useful Colorization. Having defined foo above, type 97 | in foo hey. Note that the error comes back in red. Go up one 98 | in the command history and add you and see that regular 99 | stdout output comes through in blue (the colors are configurable). 100 | 101 |
  • Cut/Copy/Paste. You should be able to do that between outside 102 | windows and TkCon. The default keys are 103 | <Control-x>/<Control-c>/<Control-v>. 104 | 105 |
106 |
107 |
108 | 109 |
110 |
© Jeffrey Hobbs
111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /docs/procs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Procedures 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Procedures 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | There are several new procedures introduced in TkCon to improve 60 | productivity and/or account for lost functionality in the Tcl environment 61 | that users are used to in native environments. There are also some 62 | redefined procedures. Here is a non-comprehensive list: 63 | 64 |

65 | 66 |
alias ?sourceCmd targetCmd ?arg arg ...?? 67 |
Simple alias mechanism. It will overwrite existing commands. 68 | When called without args, it returns current aliases. Note that TkCon 69 | makes some aliases for you (in slaves). 70 | Don't delete those. 71 | 72 |
clear ?percentage? 73 |
Clears the text widget. Same as the <Control-l> binding, except 74 | this will accept a percentage of the buffer to clear (1-100, 100 default). 75 | 76 |
dir ?-all? ?-full? ?-long? ?pattern pattern ...? 77 |
Cheap way to get directory listings. Uses glob style pattern matching. 78 | 79 |
dump type ?-nocomplain? ?-filter pattern? ?--? 80 | pattern ?pattern ...? 81 |
The dump command provides a way for the user to spit out 82 | state information about the interpreter in a Tcl readable (and human 83 | readable) form. 84 | See further dump docs for details. 85 | 86 |
echo ?arg arg ...? 87 |
Concatenates the args and spits the result to the console (stdout). 88 | 89 |
edit ?-type type? ?-find str? ?-attach interp? arg 90 | NEW in v1.4, still under construction 91 |
Opens an editor with the data from arg. The optional type 92 | argument can be one of: proc, var or file. For 93 | proc or var, the arg may be a pattern. 94 | 95 |
idebug command ?args? 96 |
Interactive debugging command. 97 | See further idebug docs for details. 98 | 99 |
lremove ?-all? ?-regexp -glob? list items 100 |
Removes one or more items from a list and returns the new list. If 101 | -all is specified, it removes all instances of each item in the 102 | list. If -regexp or -glob is specified, it interprets each 103 | item in the items list as a regexp or glob pattern to match against. 104 | 105 |
less 106 |
Aliased to edit. 107 | 108 |
ls 109 |
Aliased to dir -full. 110 | 111 |
more 112 |
Aliased to edit. 113 | 114 |
observe type ?args? 115 |
This command provides passive runtime debugging output for variables 116 | and commands. 117 | See further observe docs for details. 118 | 119 |
puts (same options as always) 120 |
Redefined to put the output into TkCon 121 | 122 |
tkcon method ?args? 123 |
Multi-purpose command. 124 | See further tkcon docs for details. 125 | 126 |
tclindex ?-extensions patternlist? ?-index TCL_BOOLEAN? 127 | ?-package TCL_BOOLEAN? ?dir1 dir2 ...? 128 |
Convenience proc to update the tclIndex (controlled by -index switch) 129 | and/or pkgIndex.tcl (controlled by -package switch) file in the named 130 | directories based on the given pattern for files. It defaults to creating 131 | the tclIndex but not the pkgIndex.tcl file, with the directory defaulting 132 | to [pwd]. The extension defaults to *.tcl, with *.[info sharelibextension] 133 | added when -package is true. 134 | 135 |
unalias cmd 136 |
unaliases command 137 | 138 |
what string 139 |
The what command will identify the word given in 140 | string in the Tcl environment and return a list of types that 141 | it was recognized as. Possible types are: alias, procedure, command, 142 | array variable, scalar variable, directory, file, widget, and executable. 143 | Used by procedures dump and which. 144 | 145 |
which command 146 |
Like the 'which' command of Unix shells, this will tell you if a 147 | particular command is known, and if so, whether it is internal or external 148 | to the interpreter. If it is an internal command and there is a slot in 149 | auto_index for it, it tells you the file that auto_index would load. This 150 | does not necessarily mean that that is where the file came from, but if it 151 | were not in the interpreter previously, then that is where the command was 152 | found. 153 | 154 |
155 | 156 | There are several procedures that I use as helpers that some may find 157 | helpful in there coding (ie - expanding pathnames). Feel free to lift 158 | them from the code (but do assign proper attribution). 159 |
160 |
161 | 162 |
163 |
© 164 | Jeffrey Hobbs
165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /docs/purpose.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Purpose & Features 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Purpose & Features 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 | 43 |

Purpose:

44 | 45 | tkcon is a replacement for the standard console that comes with Tk (on 46 | Windows/Mac, but also works on Unix). The console itself provides 47 | many more features than the standard console. tkcon works on all 48 | platforms where Tcl/Tk is available. It is meant primarily to aid one when 49 | working with the little details inside tcl and tk, giving Unix users the GUI 50 | console provided by default in the Mac and Windows Tk. It's also not a bad 51 | replacement for the default MS-DOS shell (although it needs lots of fine 52 | tuning). 53 |

54 | See Limitations for a good idea of what 55 | tkcon can't do for you. 56 | 57 |

Features:

58 | 59 | Just in case you don't run across them while playing, here are some of the 60 | extras in tkcon: 61 |
    62 |
  • Command history 63 |
  • Path (Unix style) / Proc / Variable name expansion 64 |
  • Multiple consoles, each with its own state (via multiple interpreters) 65 |
  • Captures stdout and stderr to console window 66 |
  • Electric character matching (a la emacs) 67 |
  • Electric proc highlighting 68 |
  • Enhanced history searching 69 |
  • Configurable 70 |
  • Cut / Copy / Paste between windows 71 |
  • Communication between consoles and other Tk interpreters (including 72 | non-tcl ones) 73 |
  • Hot Errors (click on error result to see stack trace) 74 |
  • Works on all Tk platforms 75 |
76 | 77 | Read the documentation for how to take advantage 78 | of these features. 79 |
80 |
81 | 82 |
83 |
© 84 | Jeffrey Hobbs
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /docs/start.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: Getting Started 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: Getting Started 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

Resource File:

59 | 60 | TkCon will search for a resource file in "$env(HOME)/.tkconrc" 61 | (Unix), "$env(HOME)/tkcon.cfg" (Windows) or 62 | "$env(PREF_FOLDER)/tkcon.cfg" (Macintosh). On DOS machines, 63 | "$env(HOME)" usually refers to "C:\". TkCon 64 | never sources the "~/.wishrc" file. The resource file is 65 | sourced by each new instance of the console. An example resource file is 66 | provided below. 67 | 68 |

Command Line Arguments

69 | 70 | Except for -rcfile, command line arguments are handled after 71 | the TkCon resource file is sourced, but before the slave interpreter or the 72 | TkCon user interface is initialized. -rcfile is handled right 73 | before it would be sourced, allowing you to specify any alternate file. 74 | Command line arguments are passed to each new console and will be evaluated 75 | by each. To prevent this from happening, you have to say 76 | tkcon main set argv {}; tkcon main set argc 0. 77 |

78 | For these options, any unique substring is allowed. 79 | 80 |

81 | 82 |
-argv (also --) 83 |
Causes TkCon to stop evaluating arguments and set the remaining args to 84 | be argv/argc (with -- prepended). This carries over for any 85 | further consoles. This is meant only for wrapping TkCon around programs 86 | that require their own arguments. 87 | 88 |
-color-<color> color 89 |
Sets the requested color type to the specified color for tkcon. 90 | See the Variables section for the recognized 91 | <color> names. 92 | 93 |
-eval (also -main or -e) 94 |
A tcl script to eval in each main interpreter. This is evaluated 95 | after the resource file is loaded and the slave interpreter is created. 96 | Multiple -eval switches will be recognized (in order). 97 | 98 |
-exec slavename 99 |
Sets the named slave that tkcon operates in. In general, this is only 100 | useful to set to "" (empty), indicating to tkcon to avoid the 101 | multi-interpreter model and operate in the main environment. When this is 102 | empty, any further arguments will be only used in the first tkcon console 103 | and not passed onto further new consoles. This is useful when using tkcon 104 | as a console for extended wish executables that don't load there commands 105 | into slave interpreters. 106 | 107 |
-font font 108 |
Sets the font that tkcon uses for its text windows. If this isn't 109 | a fixed width font, tkcon will override it. 110 | 111 |
-nontcl TCL_BOOLEAN 112 |
Sets ::tkcon::OPT(nontcl) to TCL_BOOLEAN. Needed 113 | when attaching to non-Tcl interpreters. 114 | 115 |
-package package_name (also -load) 116 |
Packages to automatically load into the slave interpreters (ie - "Tk"). 117 | 118 |
-rcfile filename 119 |
Specify an alternate tkcon resource file name. 120 | 121 |
-root widgetname 122 |
Makes the named widget the root name of all consoles (ie - .tkcon). 123 | 124 |
-slave tcl_script 125 |
A tcl script to eval in each slave interpreter. This will append 126 | the one specified in the tkcon resource file, if any. 127 | 128 |
129 | 130 | Some examples of tkcon command line startup situations: 131 |
132 | 133 |
megawish tkcon.tcl -exec "" -root .tkcon mainfile.tcl 134 |
Use tkcon as a console for your megawish application. You can avoid 135 | starting the line with megawish if that is the default wish 136 | that tkcon would use. The -root ensures that tkcon will not 137 | conflict with the 138 | 139 |
tkcon.tcl -font "Courier 12" -load Tk 140 |
Use the courier font for tkcon and always load Tk in slave 141 | interpreters at startup. 142 | 143 |
tkcon.tcl -rcfile ~/.wishrc -color,bg white 144 |
Use the ~/.wishrc file as the resource file, and 145 | a white background for tkcon's text widgets. 146 | 147 |
148 | 149 |

Variables:

150 | 151 | Certain variables in TkCon can be modified to suit your needs. It's 152 | easiest to do this in the resource file, but you can do it when time the 153 | program is running (and some can be changed via the Prefs menu). All these 154 | are part of the master interpreter's ::tkcon namespace. The 155 | modifiable array variables are ::tkcon::COLOR and 156 | ::tkcon::OPT. You can call 'tkcon set 157 | ::tkcon::COLOR' when the program is running to check its state. 158 | Here is an explanation of certain variables you might change or use: 159 | 160 |
161 | 162 |
::tkcon::COLOR(bg) 163 |
The background color for tkcon text widgets. 164 | Defaults to the operating system default (determined at startup). 165 | 166 |
::tkcon::COLOR(blink) 167 |
The background color of the electric brace highlighting, if on. 168 | Defaults to yellow. 169 | 170 |
::tkcon::COLOR(cursor) 171 |
The background color for the insertion cursor in tkcon. 172 | Defaults to black. 173 | 174 |
::tkcon::COLOR(disabled) 175 |
The foreground color for disabled menu items. 176 | Defaults to dark grey. 177 | 178 |
::tkcon::COLOR(proc) 179 |
The foreground color of a recognized proc, if command highlighting is on. 180 | Defaults to dark green. 181 | 182 |
::tkcon::COLOR(var) 183 |
The background color of a recognized var, if command highlighting is on. 184 | Defaults to pink. 185 | 186 |
::tkcon::COLOR(prompt) 187 |
The foreground color of the prompt as output in the console. 188 | Defaults to brown. 189 | 190 |
::tkcon::COLOR(stdin) 191 |
The foreground color of the stdin for the console. 192 | Defaults to black. 193 | 194 |
::tkcon::COLOR(stdout) 195 |
The foreground color of the stdout as output in the console. 196 | Defaults to blue. 197 | 198 |
::tkcon::COLOR(stderr) 199 |
The foreground color of stderr as output in the console. 200 | Defaults to red. 201 |

202 | 203 |

::tkcon::OPT(autoload) 204 |
Packages to automatically load into the slave interpreter (ie - 'Tk'). 205 | This is a list. Defaults to {} (none). 206 | 207 |
::tkcon::OPT(blinktime) 208 |
The amount of time (in millisecs) that braced sections should 209 | blink for. Defaults to 500 (.5 secs), must be at least 100. 210 | 211 |
::tkcon::OPT(blinkrange) 212 |
Whether to blink the entire range for electric brace matching or to 213 | just blink the actual matching braces (respectively 1 or 0, defaults to 1). 214 | 215 |
::tkcon::OPT(buffer) 216 |
The size of the console scroll buffer (in lines). 217 | Defaults to 512. 218 | 219 |
::tkcon::OPT(calcmode) 220 |
Whether to allow expr commands to be run at the command 221 | line without prefixing them with expr (just a convenience). 222 | 223 |
::tkcon::OPT(cols) 224 |
Number of columns for the console to start out with. Defaults to 80. 225 | 226 |
::tkcon::OPT(dead) 227 |
What to do with dead connected interpreters. If dead 228 | is leave, TkCon automatically exits the dead interpreter. If 229 | dead is ignore then it remains attached waiting for 230 | the interpreter to reappear. Otherwise TkCon will prompt you. 231 | 232 |
::tkcon::OPT(exec) 233 |
This corresponds to the -exec option above 234 | 235 |
::tkcon::OPT(font) 236 |
Font to use for tkcon text widgets (also specified with -font). 237 | Defaults to the system default, or a fixed width equivalent. 238 | 239 |
::tkcon::OPT(gets) 240 |
Controls whether tkcon will overload the gets command to work with 241 | tkcon. The valid values are: congets (the default), which 242 | will redirect stdin requests to the tkcon window; 243 | gets, which will pop up a dialog to get input; and {} (empty 244 | string) which tells tkcon not to overload gets. This value must be set at 245 | startup to alter tkcon's behavior. 246 | 247 |
::tkcon::OPT(history) 248 |
The size of the history list to keep. Defaults to 48. 249 | 250 |
::tkcon::OPT(hoterrors) 251 |
Whether hot errors are enabled or not. When enabled, errors that 252 | are returned to the console are marked with a link to the error info 253 | that will pop up in an minimal editor. This requires more memory because 254 | each error that occurs will maintain bindings for this feature, as long 255 | as the error is in the text widget. Defaults to on. 256 | 257 |
::tkcon::OPT(library) 258 |
The path to any tcl library directories (these are appended to the 259 | auto_path when the after the resource file is loaded in). 260 | 261 |
::tkcon::OPT(lightbrace) 262 |
Whether to use the brace highlighting feature or not 263 | (respectively 1 or 0, defaults to 1). 264 | 265 |
::tkcon::OPT(lightcmd) 266 |
Whether to use the command highlighting feature or not 267 | (respectively 1 or 0, defaults to 1). 268 | 269 |
::tkcon::OPT(maineval) 270 |
A tcl script to execute in the main interpreter after the slave 271 | interpreter is created and the user interface is initialized. 272 | 273 |
::tkcon::OPT(maxlinelen) 274 |
A number that specifies the limit of long result lines. 275 | True result is still captured in $_ (and 'puts $_' works). 276 | Defaults to 0 (unlimited). 277 | 278 |
::tkcon::OPT(maxmenu) 279 |
A number that specifies the maximum number of packages to show 280 | vertically in the Interp->Packages menu before breaking into 281 | another column. Defaults to 15. 282 | 283 |
::tkcon::OPT(nontcl) 284 |
For those who might be using non-Tcl based Tk attachments, set this 285 | to 1. It prevents TkCon from trying to evaluate its own Tcl code in an 286 | attached interpreter. Also see my notes for non-Tcl 287 | based Tk interpreters. 288 | 289 |
::tkcon::OPT(prompt1) 290 |
Like tcl_prompt1, except it doesn't require you use 'puts'. 291 | No equivalent for tcl_prompt2 is available (it's unnecessary IMHO). 292 |
Defaults to {([file tail [pwd]]) [history nextid] % }. 293 | 294 |
::tkcon::OPT(rows) 295 |
Number of rows for the console to start out with. Defaults to 20. 296 | 297 |
::tkcon::OPT(scollypos) 298 |
Y scrollbar position. Valid values are left or 299 | right. Defaults to left. 300 | 301 |
::tkcon::OPT(showmenu) 302 |
Show the menubar on startup (1 or 0, defaults to 1). 303 | 304 |
::tkcon::OPT(showmultiple) 305 |
Show multiple matches for path/proc/var name expansion 306 | (1 or 0, defaults to 1). 307 | 308 |
::tkcon::OPT(slaveeval) 309 |
A tcl script to execute in each slave interpreter right after it's 310 | created. This allows the user to have user defined info always available 311 | in a slave. Example: 312 |
	set ::tkcon::OPT(slaveeval) {
313 | 		proc foo args { puts $args }
314 | 		lappend auto_path .
315 | 	}
316 | 317 |
::tkcon::OPT(slaveexit) 318 |
Allows the prevention of exit in slaves from exitting 319 | the entire application. If it is equal to exit, exit will 320 | exit as usual, otherwise it will just close down that interpreter (and 321 | any children). Defaults to close. 322 | 323 |
::tkcon::OPT(subhistory) 324 |
Allow history substitution to occur (0 or 1, defaults to 1). The 325 | history list is maintained in a single interpreter per TkCon console 326 | instance. Thus you have history which can range over a series of attached 327 | interpreters. 328 |
329 | 330 |

331 | 332 | An example TkCon resource file might look like: 333 | 334 |

######################################################
335 | ## My TkCon Resource File
336 |  
337 | # Use a fixed default font
338 | #tkcon font fixed; # valid on unix
339 | #tkcon font systemfixed; # valid on win
340 | tkcon font Courier 12; # valid everywhere
341 | 
342 | # Keep 50 commands in history
343 | set ::tkcon::OPT(history) 50
344 | 
345 | # Use a pink prompt
346 | set ::tkcon::COLOR(prompt) pink
347 | ######################################################
348 | 349 |

350 |

351 |
352 | 353 |
354 |
© 355 | Jeffrey Hobbs
356 | 357 | 358 | 359 | -------------------------------------------------------------------------------- /docs/style.css: -------------------------------------------------------------------------------- 1 | body, div, p, th, td, li, dd, ul, ol, dl, dt, blockquote { 2 | font-family: Arial, Helvetica, sans-serif; 3 | } 4 | body { 5 | background-color: #FFFFFF; 6 | font-size: 12px; 7 | line-height: 1.25; 8 | letter-spacing: .2px; 9 | } 10 | th { 11 | font-style: bold; 12 | text-align: left; 13 | } 14 | a { text-decoration: none } 15 | .hi, .hi2 { 16 | font-weight: bold; 17 | color: #B82619; 18 | background: #FFFFCC; 19 | text-decoration: none; 20 | } 21 | .hi2 { background: #CCFFCC; } 22 | .indent { margin: 3px; } 23 | 24 | /* general styles */ 25 | .heading { 26 | font-size: 14px; 27 | font-weight: bold; 28 | color: #B82619; 29 | } 30 | .subheading { 31 | font-weight: bold; 32 | color: #B82619; 33 | } 34 | 35 | .err { 36 | font-weight: bold; 37 | color: #B82619; 38 | } 39 | .smallText{ 40 | font-size: 10px; 41 | } 42 | .notsosmallText { 43 | font-size: 11px; 44 | } 45 | 46 | /* unordered list without bullets */ 47 | ul.sans { 48 | list-style-type: none; 49 | list-style-postition: inside; 50 | } 51 | -------------------------------------------------------------------------------- /docs/tkcon.1.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- tkcon manpage}] 2 | [manpage_begin tkcon 1 2.5] 3 | [copyright {Jeffrey Hobbs (jeff at hobbs.org)}] 4 | [moddesc {TkCon}] 5 | [titledesc {Tk console replacement}] 6 | 7 | [description] 8 | [para] 9 | TkCon is a replacement for the standard console that comes with Tk 10 | (on Windows/Mac, but also works on Unix). 11 | The console itself provides many more features than the standard 12 | console. 13 | TkCon works on all platforms where Tcl/Tk is available. 14 | It is meant primarily to aid one when working with the little 15 | details inside Tcl and Tk, giving Unix users the GUI console 16 | provided by default in the Mac and Windows Tk. 17 | 18 | [list_begin definitions] 19 | [call [cmd tkcon] [lb]\{[arg option] [arg value] | [arg tcl_script]\} ...[rb]] 20 | [list_end] 21 | 22 | [section OPTIONS] 23 | [para] 24 | Except for [cmd -rcfile], command line arguments are handled after 25 | the TkCon resource file is sourced, but before the slave 26 | interpreter or the TkCon user interface is initialized. 27 | 28 | [para] 29 | [cmd -rcfile] is handled right before it would be sourced, 30 | allowing you to specify any alternate file. 31 | Command line arguments are passed to each new console and 32 | will be evaluated by each. 33 | To prevent this from happening, you have to say 34 | 35 | [example_begin] 36 | tkcon main set argv {}; tkcon main set argc 0 37 | [example_end] 38 | 39 | [para] 40 | For these options, any unique substring is allowed. 41 | 42 | [list_begin definitions] 43 | [def "[cmd -argv] (also [cmd --])"] 44 | Causes TkCon to stop evaluating arguments and set the remaining 45 | args to be argv/argc (with [cmd --] prepended). 46 | This carries over for any further consoles. 47 | This is meant only for wrapping TkCon 48 | around programs that require their own arguments. 49 | 50 | [def "[cmd -color-] [arg color]"] 51 | Sets the requested color type to the specified color for tkcon. 52 | See [cmd tkconrc](5) for the recognized [cmd ] names. 53 | 54 | [def "[cmd -eval] [arg tcl_script] (also [cmd -main] or [cmd -e])"] 55 | A Tcl script to eval in each main interpreter. 56 | This is evaluated after the resource file is loaded and the 57 | slave interpreter is created. 58 | Multiple [cmd -eval] switches will be recognized (in order). 59 | 60 | [def "[cmd -exec] [arg slavename]"] 61 | Sets the named slave that tkcon operates in. 62 | In general, this is only useful to set to [arg {""}] (empty), 63 | indicating to tkcon to avoid the multi-interpreter model and 64 | operate in the main environment. 65 | When this is empty, any further arguments will be only used 66 | in the first tkcon console and not passed onto further new consoles. 67 | This is useful when using tkcon as a console for extended wish 68 | executables that don't load there commands into slave interpreters. 69 | 70 | [def "[cmd -font] [arg font]"] 71 | Sets the font that tkcon uses for its text windows. 72 | If this isn't a fixed width font, tkcon will override it. 73 | 74 | [def "[cmd -nontcl] [arg TCL_BOOLEAN]"] 75 | Sets [cmd ::tkcon::OPT(nontcl)] to [arg TCL_BOOLEAN] (see 76 | [cmd tkconrc](5)). 77 | Needed when attaching to non-Tcl interpreters. 78 | 79 | [def "[cmd -package] [arg package_name] (also [cmd -load])"] 80 | Packages to automatically load into the slave interpreters (i.e. "Tk"). 81 | 82 | [def "[cmd -rcfile] [arg filename]"] 83 | Specify an alternate tkcon resource file name. 84 | 85 | [def "[cmd -root] [arg widgetname]"] 86 | Makes the named widget the root name of all consoles (i.e. .tkcon). 87 | 88 | [def "[cmd -slave] [arg tcl_script]"] 89 | A Tcl script to eval in each slave interpreter. 90 | This will append the one specified in the tkcon resource file, if any. 91 | 92 | [list_end] 93 | 94 | [section {KEY BINDINGS}] 95 | [para] 96 | Most of the bindings are the same as for the [cmd text] widget. 97 | Some have been modified to make sure that the integrity of the 98 | console is maintained. 99 | Others have been added to enhance the usefulness of the console. 100 | Only the modified or new bindings are listed here. 101 | 102 | [list_begin definitions] 103 | 104 | [def "[cmd Control-x] or [cmd Cut] (on Sparc5 keyboards)"] 105 | Cut. 106 | 107 | [def "[cmd Control-c] or [cmd Copy] (on Sparc5 keyboards)"] 108 | Copy. 109 | 110 | [def "[cmd Control-v] or [cmd Paste] (on Sparc5 keyboards)"] 111 | Paste. 112 | 113 | [def [cmd Insert]] 114 | Insert (duh). 115 | 116 | [def [cmd Up]] 117 | Goes up one level in the commands line history when cursor is on 118 | the prompt line, otherwise it moves through the buffer. 119 | 120 | [def [cmd Down]] 121 | Goes down one level in the commands line history when cursor 122 | is on the last line of the buffer, otherwise it moves through the buffer. 123 | 124 | [def [cmd Control-p]] 125 | Goes up one level in the commands line history. 126 | 127 | [def [cmd Control-n]] 128 | Goes down one level in the commands line history. 129 | 130 | [def [cmd Tab]] 131 | Tries to expand file path names, then variable names, then proc names. 132 | 133 | [def [cmd Escape]] 134 | Tries to expand file path names. 135 | 136 | [def [cmd Control-P]] 137 | Tries to expand procedure names. 138 | The procedure names will be those that are actually in the attached 139 | interpreter (unless nontcl is specified, in which case it always 140 | does the lookup in the default slave interpreter). 141 | 142 | [def [cmd Control-V]] 143 | Tries to expand variable names (those returned by [lb]info vars[rb]). 144 | It's search behavior is like that for procedure names. 145 | 146 | [def "[cmd Return] or [cmd Enter]"] 147 | Evaluates the current command line if it is a complete command, 148 | otherwise it just goes to a new line. 149 | 150 | [def [cmd Control-a]] 151 | Go to the beginning of the current command line. 152 | 153 | [def [cmd Control-l]] 154 | Clear the entire console buffer. 155 | 156 | [def [cmd Control-r]] 157 | Searches backwards in the history for any command that contains 158 | the string in the current command line. 159 | Repeatable to search farther back. 160 | The matching substring off the found command will blink. 161 | 162 | [def [cmd Control-s]] 163 | As above, but searches forward (only useful if you searched too far back). 164 | 165 | [def [cmd Control-t]] 166 | Transposes characters. 167 | 168 | [def [cmd Control-u]] 169 | Clears the current command line. 170 | 171 | [def [cmd Control-z]] 172 | Saves current command line in a buffer that can be retrieved 173 | with another [cmd Control-z]. 174 | If the current command line is empty, then any saved command 175 | is retrieved without being overwritten, otherwise the current 176 | contents get swapped with what's in the saved command buffer. 177 | 178 | [def [cmd Control-Key-1]] 179 | Attaches console to the console's slave interpreter. 180 | 181 | [def [cmd Control-Key-2]] 182 | Attaches console to the console's master interpreter. 183 | 184 | [def [cmd Control-Key-3]] 185 | Attaches console to main TkCon interpreter. 186 | 187 | [def [cmd Control-A]] 188 | Pops up the "About" dialog. 189 | 190 | [def [cmd Control-N]] 191 | Creates a new console. Each console has separate state, including 192 | it's own widget hierarchy (it's a slave interpreter). 193 | 194 | [def [cmd Control-q]] 195 | Close the current console OR Quit the program (depends on the 196 | value of [cmd ::tkcon::TKCON(slaveexit)]). 197 | 198 | [def [cmd Control-w]] 199 | Closes the current console. 200 | Closing the main console will exit the program (something has 201 | to control all the slaves...). 202 | 203 | [list_end] 204 | 205 | [para] 206 | TkCon also has electric bracing (similar to that in emacs). 207 | It will highlight matching pairs of {}'s, [lb][rb]'s, ()'s and ""'s. 208 | For the first three, if there is no matching left element for the right, 209 | then it blinks the entire current command line. 210 | For the double quote, if there is no proper match then it just blinks 211 | the current double quote character. 212 | It does properly recognize most escaping (except escaped escapes), 213 | but does not look for commenting (why would you interactively 214 | put comments in?). 215 | 216 | [section COMMANDS] 217 | [para] 218 | There are several new procedures introduced in TkCon to improve 219 | productivity and/or account for lost functionality in the Tcl 220 | environment that users are used to in native environments. 221 | There are also some redefined procedures. 222 | Here is a non-comprehensive list: 223 | 224 | [list_begin definitions] 225 | 226 | [def "[cmd alias] ?[arg sourceCmd] [arg targetCmd] ?[arg arg] [arg arg] ...??"] 227 | Simple alias mechanism. 228 | It will overwrite existing commands. 229 | When called without args, it returns current aliases. 230 | Note that TkCon makes some aliases for you (in slaves). 231 | Don't delete those. 232 | 233 | [def "[cmd clear] ?[arg percentage]?"] 234 | Clears the text widget. 235 | Same as the <[cmd Control-l]> binding, except this will accept a 236 | percentage of the buffer to clear (1-100, 100 default). 237 | 238 | [def "[cmd dir] ?[arg -all]? ?[arg -full]? ?[arg -long]?\ 239 | ?[arg pattern] [arg pattern] ...?"] 240 | Cheap way to get directory listings. 241 | Uses glob style pattern matching. 242 | 243 | [def "[cmd dump] [arg type] ?[arg -nocomplain]? ?[arg {-filter pattern}]?\ 244 | ?[cmd --]? [arg pattern] ?[arg pattern] ...?"] 245 | The dump command provides a way for the user to spit out state 246 | information about the interpreter in a Tcl readable (and 247 | human readable) form. 248 | See [cmd dump](n) for details. 249 | 250 | [def "[cmd echo] ?[arg arg] [arg arg] ...?"] 251 | Concatenates the args and spits the result to the console (stdout). 252 | 253 | [def "[cmd edit] ?[arg {-type type}]? ?[arg {-find str}]?\ 254 | ?[arg {-attach interp}]? [arg arg]"] 255 | Opens an editor with the data from arg. 256 | The optional type argument can be one of: [arg proc], [arg var] or [arg file]. 257 | For proc or var, the arg may be a pattern. 258 | 259 | [def "[cmd idebug] [arg command] ?[arg args]?"] 260 | Interactive debugging command. 261 | See [cmd idebug](n) for details. 262 | 263 | [def "[cmd lremove] ?[arg -all]? ?[arg -regexp] [arg -glob]?\ 264 | [arg list] [arg items]"] 265 | Removes one or more items from a list and returns the new list. 266 | If [arg -all] is specified, it removes all instances of each item 267 | in the list. 268 | If [arg -regexp] or [arg -glob] is specified, it interprets each item in 269 | the items list as a regexp or glob pattern to match against. 270 | 271 | [def [cmd less]] 272 | Aliased to [cmd edit]. 273 | 274 | [def [cmd ls]] 275 | Aliased to [cmd dir] [arg -full]. 276 | 277 | [def [cmd more]] 278 | Aliased to [cmd edit]. 279 | 280 | [def "[cmd observe] [arg type] ?[arg args]?"] 281 | This command provides passive runtime debugging output for 282 | variables and commands. 283 | See [cmd observe](n) for details. 284 | 285 | [def "[cmd puts] (same options as always)"] 286 | Redefined to put the output into TkCon. 287 | 288 | [def "[cmd tkcon] [arg method] ?[arg args]?"] 289 | Multi-purpose command. 290 | See [cmd tkcon](n) for details. 291 | 292 | [def "[cmd tclindex] [arg {?-extensions patternlist? ?-index TCL_BOOLEAN?\ 293 | ?-package TCL_BOOLEAN? ?dir1 dir2 ...?}]"] 294 | Convenience proc to update the [file tclIndex] (controlled by [arg -index] switch) 295 | and/or [file pkgIndex.tcl] (controlled by [arg -package] switch) file in the named 296 | directories based on the given pattern for files. 297 | It defaults to creating the [file tclIndex] but not the [file pkgIndex.tcl] file, 298 | with the directory defaulting to [lb]pwd[rb]. 299 | The extension defaults to *.tcl, with *.[lb]info sharelibextension[rb] 300 | added when [arg -package] is true. 301 | 302 | [def "[cmd unalias] [arg cmd]"] 303 | unaliases command. 304 | 305 | [def "[cmd what] [arg string]"] 306 | The what command will identify the word given in string in 307 | the Tcl environment and return a list of types that it was recognized as. 308 | Possible types are: alias, procedure, command, array variable, 309 | scalar variable, directory, file, widget, and executable. 310 | Used by procedures dump and which. 311 | 312 | [def "[cmd which] [arg command]"] 313 | Like the [syscmd which] command of Unix shells, this will tell you if a 314 | particular command is known, and if so, whether it is internal or 315 | external to the interpreter. 316 | If it is an internal command and there is a slot in [cmd auto_index] for it, 317 | it tells you the file that [cmd auto_index] would load. 318 | This does not necessarily mean that that is where the file came from, 319 | but if it were not in the interpreter previously, then that 320 | is where the command was found. 321 | 322 | [list_end] 323 | 324 | [para] 325 | There are several procedures that I use as helpers that some may find 326 | helpful in there coding (i.e. expanding pathnames). Feel free to lift 327 | them from the code (but do assign proper attribution). 328 | 329 | [section EXAMLPES] 330 | [para] 331 | Some examples of tkcon command line startup situations: 332 | 333 | [example_begin] 334 | [cmd megawish] /usr/bin/tkcon [cmd -exec] "" [cmd -root] .tkcon [arg mainfile.tcl] 335 | [example_end] 336 | 337 | Use tkcon as a console for your [cmd megawish] application. 338 | You can avoid starting the line with megawish if that is the 339 | default [cmd wish] that TkCon would use. 340 | The [cmd -root] ensures that tkcon will not conflict with the 341 | application root window. 342 | 343 | [example_begin] 344 | [cmd tkcon] [cmd -font] "Courier 12" [cmd -load] Tk 345 | [example_end] 346 | 347 | Use the courier font for TkCon and always load Tk in slave 348 | interpreters at startup. 349 | 350 | [example_begin] 351 | [cmd tkcon] [cmd -rcfile] ~/.wishrc [cmd -color-bg] white 352 | [example_end] 353 | 354 | Use the ~/.wishrc file as the resource file, and a white 355 | background for TkCon's text widgets. 356 | 357 | [section FILES] 358 | TkCon will search for a resource file in [file ~/.tkconrc]. 359 | TkCon never sources the [file ~/.wishrc] file. 360 | The resource file is sourced by each new instance of the console. 361 | An example resource file is provided in [cmd tkconrc](5). 362 | 363 | [see_also [cmd tkconrc](5)] 364 | [see_also [cmd dump](n) [cmd tkcon](n) [cmd idebug](n)] 365 | [see_also [cmd observe](n) [cmd text](n)] 366 | [keywords Tk console] 367 | 368 | [manpage_end] 369 | 370 | -------------------------------------------------------------------------------- /docs/tkcon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: tkcon procedure 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: tkcon procedure 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
Getting StartedSpecial BindingsProceduresScreenshot
dumptkconidebugobserve
55 | 56 |
57 |
58 |

59 | This provides lots of useful control over a console: 60 | 61 |

62 | 63 |
tkcon attach interpreter 64 |
Attaches tkcon to the named interpreter. The name must be that 65 | returned by [tk appname] or a valid path to a slave 66 | interpreter. It's best to use this via the Console->Attach 67 | Console menu. 68 | 69 |
tkcon buffer ?size? 70 |
Sets or queries the allowed size of the console text widget in lines. 71 | The text widget will automatically delete leading lines once this number 72 | has been exceeded (read: this is the scroll buffer size). 73 | 74 |
tkcon bgerror ?msg errorInfo? 75 |
Does bgerror stuff in the tkcon master interpreter. 76 | 77 |
tkcon close or tkcon destroy 78 |
Destroys this tkcon widget. 79 | 80 |
tkcon congets 81 |
Behaves like the traditional Tcl gets, but instead of 82 | using stdin, it uses the tkcon console window. By default, 83 | tkcon replaces the standard gets with this command. This behavior can be 84 | controlled by altering the ::tkcon::OPT(gets) parameter at 85 | startup. This should not be called directly - instead rely on the 86 | overloaded gets, which has support for the optional varName 87 | parameter. 88 | 89 |
tkcon console args 90 |
Passes the args to the tkcon text widget (the console). 91 | 92 |
tkcon error 93 |
Pops up a dialog that gives the user a full trace of the last error 94 | received in the tkcon console. 95 | 96 |
tkcon find string ?-case TCL_BOOLEAN 97 | -regexp TCL_BOOLEAN? 98 |
Highlights all instances of string in the console. If the string 99 | is empty, it clears any previous highlighting. 100 | 101 |
tkcon font ?fontname? 102 |
Sets or returns the font used by tkcon text widgets. 103 | 104 |
tkcon gets 105 |
Behaves like the traditional Tcl gets, but instead of 106 | needing stdin, it pops a dialog box up for the user. The 107 | overloaded gets has support for the optional varName parameter. 108 | 109 |
tkcon getcommand 110 |
A variation of the congets method that requires a 111 | full command to be input before returning. 112 | 113 |
tkcon hide 114 |
Withdraw the tkcon display from the screen (make sure you have 115 | a way to get it back). 116 | 117 |
tkcon history ?-newline? 118 |
Displays the tkcon history in sourceable form. If -newline is 119 | specified, it separates each command by an extra newline. 120 | 121 |
tkcon iconify 122 |
Iconifies the tkcon display. 123 | 124 |
tkcon linelength ?value? 125 |
Sets or displays the number that specifies the limit of long result lines. 126 | True result is still captured in $_ (and 'puts $_' works). 127 | 128 |
tkcon load filename 129 |
Sources named file into the slave interpreter. If no filename is 130 | given, it will attempt to call tk_getOpenFile to pop up the 131 | file select box. 132 | 133 |
tkcon main ?arg arg ...? 134 |
Passes the args to the main tkcon interpreter to be evaluated and 135 | returns the result. 136 | 137 |
tkcon master args 138 |
Passes the args to the master interpreter to be evaluated and 139 | returns the result. 140 | 141 |
tkcon new 142 |
Creates a new tkcon widget. 143 | 144 |
tkcon resultfilter ?command? 145 |
Specify a command to process the results before outputting it to the 146 | console window. The command receives one argument (the result string) and 147 | the string returned is placed in the console. 148 | 149 |
tkcon save ?filename ?type?? 150 |
Saves the console buffer to the given filename. If no filename is 151 | given, it will attempt to call tk_getSaveFile to pop up the 152 | file select box. If no type is given, a dialog will ask you to specify 153 | what portion of the text you want to save. 154 | 155 |
tkcon set var ?value? 156 |
Queries or sets a master interpreter variable. 157 | 158 |
tkcon append var ?value? 159 |
Like set, but uses append on the variable. 160 | 161 |
tkcon lappend var ?value? 162 |
Like set, but uses lappend on the variable. 163 | 164 |
tkcon show or tkcon deiconify 165 |
Redisplays tkcon on the screen. 166 | 167 |
tkcon slave ?slavename ?arg arg ...?? 168 |
If called with no args, it returns the name of all the tkcon 169 | interpreters. Otherwise given an interp name it passes the args 170 | to the named interpreter to be evaluated and returns the result. 171 | If no args are passed, then it returns the [tk appname] 172 | of that interpreter. 173 | 174 |
tkcon title ?title? 175 |
Sets or returns the title for tkcon. 176 | 177 |
tkcon version 178 |
Returns of version of tkcon. 179 | 180 |
181 |
182 |
183 | 184 |
185 |
© 186 | Jeffrey Hobbs
187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /docs/tkcon.n.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- tkcon manpage}] 2 | [manpage_begin tkcon n 2.5] 3 | [copyright {Jeffrey Hobbs }] 4 | [moddesc {TkCon}] 5 | [titledesc {Controlling TkCon console}] 6 | 7 | [description] 8 | [para] 9 | This provides lots of useful control over a console: 10 | 11 | [list_begin definitions] 12 | 13 | [call [cmd tkcon] [arg attach] [arg interpreter]] 14 | Attaches tkcon to the named interpreter. 15 | The name must be that returned by [lb][cmd tk] [arg appname][rb] or a valid 16 | path to a slave interpreter. 17 | It's best to use this via the [arg {Console->Attach Console}] menu. 18 | 19 | [call [cmd tkcon] [arg buffer] [opt [arg size]]] 20 | Sets or queries the allowed size of the console text widget in lines. 21 | The text widget will automatically delete leading lines once this 22 | number has been exceeded (read: this is the scroll buffer size). 23 | 24 | [call [cmd tkcon] [arg bgerror] [opt "[arg msg] [arg errorInfo]"]] 25 | Does bgerror stuff in the tkcon master interpreter. 26 | 27 | [call [cmd tkcon] [arg close] or [cmd tkcon] [arg destroy]] 28 | Destroys this tkcon widget. 29 | 30 | [call [cmd tkcon] [arg congets]] 31 | Behaves like the traditional Tcl gets, but instead of using stdin, 32 | it uses the tkcon console window. 33 | By default, tkcon replaces the standard gets with this command. 34 | This behavior can be controlled by altering the [cmd ::tkcon::OPT(gets)] 35 | parameter at startup. 36 | This should not be called directly - instead rely on the overloaded 37 | gets, which has support for the optional varName parameter. 38 | 39 | [call [cmd tkcon] [arg console] [arg args]] 40 | Passes the args to the tkcon text widget (the console). 41 | 42 | [call [cmd tkcon] [arg error]] 43 | Pops up a dialog that gives the user a full trace of the 44 | last error received in the tkcon console. 45 | 46 | [call [cmd tkcon] [arg find] [arg string]\ 47 | [opt "[arg -case] [arg TCL_BOOLEAN] [arg -regexp] [arg TCL_BOOLEAN]"]] 48 | Highlights all instances of string in the console. 49 | If the string is empty, it clears any previous highlighting. 50 | 51 | [call [cmd tkcon] [arg font] [opt [arg fontname]]] 52 | Sets or returns the font used by tkcon text widgets. 53 | 54 | [call [cmd tkcon] [arg gets]] 55 | Behaves like the traditional Tcl gets, but instead of needing 56 | stdin, it pops a dialog box up for the user. 57 | The overloaded gets has support for the optional varName parameter. 58 | 59 | [call [cmd tkcon] [arg getcommand]] 60 | A variation of the congets method that requires a full 61 | command to be input before returning. 62 | 63 | [call [cmd tkcon] [arg hide]] 64 | Withdraw the tkcon display from the screen (make sure you 65 | have a way to get it back). 66 | 67 | [call [cmd tkcon] [arg history] [opt [arg -newline]]] 68 | Displays the tkcon history in sourceable form. 69 | If [arg -newline] is specified, it separates each command by 70 | an extra newline. 71 | 72 | [call [cmd tkcon] [arg iconify]] 73 | Iconifies the tkcon display. 74 | 75 | [call [cmd tkcon] [arg linelength] [opt [arg value]]] 76 | Sets or displays the number that specifies the limit of long result lines. 77 | True result is still captured in $_ (and 'puts $_' works). 78 | 79 | [call [cmd tkcon] [arg load] [arg filename]] 80 | Sources named file into the slave interpreter. 81 | If no filename is given, it will attempt to call 82 | [cmd tk_getOpenFile] to pop up the file select box. 83 | 84 | [call [cmd tkcon] [arg main] [opt "[arg arg] [arg arg] [arg ...]"]] 85 | Passes the args to the main tkcon interpreter to be 86 | evaluated and returns the result. 87 | 88 | [call [cmd tkcon] [arg master] [arg args]] 89 | Passes the args to the master interpreter to be evaluated 90 | and returns the result. 91 | 92 | [call [cmd tkcon] [arg new]] 93 | Creates a new tkcon widget. 94 | 95 | [call [cmd tkcon] [arg resultfilter] [opt [arg command]]] 96 | Specify a command to process the results before outputting it to the console 97 | window. The command receives one argument (the result string) and the string 98 | returned is placed in the console. 99 | 100 | [call [cmd tkcon] [arg save] [opt "[arg filename] [opt [arg type]]"]] 101 | Saves the console buffer to the given filename. 102 | If no filename is given, it will attempt to call 103 | [cmd tk_getSaveFile] to pop up the file select box. 104 | If no type is given, a dialog will ask you to specify 105 | what portion of the text you want to save. 106 | 107 | [call [cmd tkcon] [arg set] [arg var] [opt [arg value]]] 108 | Queries or sets a master interpreter variable. 109 | 110 | [call [cmd tkcon] [arg append] [arg var] [opt [arg value]]] 111 | Like set, but uses append on the variable. 112 | 113 | [call [cmd tkcon] [arg lappend] [arg var] [opt [arg value]]] 114 | Like set, but uses lappend on the variable. 115 | 116 | [call [cmd tkcon] [arg show] or [cmd tkcon] [arg deiconify]] 117 | Redisplays tkcon on the screen. 118 | 119 | [call [cmd tkcon] [arg slave] [opt "[arg slavename] [opt [arg {arg arg ...}]]"]] 120 | If called with no args, it returns the name of all the tkcon interpreters. 121 | Otherwise given an interp name it passes the args to the named interpreter 122 | to be evaluated and returns the result. 123 | If no args are passed, then it returns the [lb][cmd tk] [arg appname][rb] of that 124 | interpreter. 125 | 126 | [call [cmd tkcon] [arg title] [opt [arg title]]] 127 | Sets or returns the title for tkcon. 128 | 129 | [call [cmd tkcon] [arg version]] 130 | Returns of version of tkcon. 131 | 132 | [list_end] 133 | 134 | [see_also [cmd tkcon](1)] 135 | [see_also [cmd tkconrc](5) [cmd tkcon](n) [cmd dump](n)] 136 | [see_also [cmd observe](n)] 137 | [keywords Tk console debug] 138 | 139 | [manpage_end] 140 | 141 | -------------------------------------------------------------------------------- /docs/tkconrc.5.man: -------------------------------------------------------------------------------- 1 | [comment {-*- tcl -*- tkconrc manpage}] 2 | [manpage_begin tkconrc 5 2.5] 3 | [copyright {Jeffrey Hobbs }] 4 | [moddesc {TkCon}] 5 | [titledesc {TkCon resource file}] 6 | 7 | [description] 8 | [para] 9 | TkCon will search for a resource file in [file ~/.tkconrc]. 10 | TkCon never sources the [file ~/.wishrc] file. 11 | The resource file is sourced by each new instance of the console. 12 | An example resource file is provided below. 13 | 14 | [para] 15 | The file itself is a Tcl script, so it is required that the 16 | file conforms to Tcl script conventions. 17 | 18 | [section VARIABLES] 19 | [para] 20 | Certain variables in TkCon can be modified to suit your needs. 21 | It's easiest to do this in the resource file, but you can do 22 | it when time the program is running (and some can be changed 23 | via the [arg Prefs] menu). 24 | All these are part of the master interpreter's [cmd ::tkcon] 25 | namespace. 26 | The modifiable array variables are [cmd ::tkcon::COLOR] and 27 | [cmd ::tkcon::OPT]. 28 | You can call 29 | 30 | [example_begin] 31 | tkcon set ::tkcon::COLOR 32 | [example_end] 33 | 34 | when the program is running to check its state. 35 | Here is an explanation of certain variables you 36 | might change or use: 37 | 38 | [list_begin definitions] 39 | 40 | [def [cmd ::tkcon::COLOR(bg)]] 41 | The background color for tkcon text widgets. 42 | Defaults to the operating system default (determined at startup). 43 | 44 | [def [cmd ::tkcon::COLOR(blink)]] 45 | The background color of the electric brace highlighting, if on. 46 | Defaults to yellow. 47 | 48 | [def [cmd ::tkcon::COLOR(cursor)]] 49 | The background color for the insertion cursor in tkcon. 50 | Defaults to black. 51 | 52 | [def [cmd ::tkcon::COLOR(disabled)]] 53 | The foreground color for disabled menu items. 54 | Defaults to dark grey. 55 | 56 | [def [cmd ::tkcon::COLOR(proc)]] 57 | The foreground color of a recognized proc, if command highlighting is on. 58 | Defaults to dark green. 59 | 60 | [def [cmd ::tkcon::COLOR(var)]] 61 | The background color of a recognized var, if command highlighting is on. 62 | Defaults to pink. 63 | 64 | [def [cmd ::tkcon::COLOR(prompt)]] 65 | The foreground color of the prompt as output in the console. 66 | Defaults to brown. 67 | 68 | [def [cmd ::tkcon::COLOR(stdin)]] 69 | The foreground color of the stdin for the console. 70 | Defaults to black. 71 | 72 | [def [cmd ::tkcon::COLOR(stdout)]] 73 | The foreground color of the stdout as output in the console. 74 | Defaults to blue. 75 | 76 | [def [cmd ::tkcon::COLOR(stderr)]] 77 | The foreground color of stderr as output in the console. 78 | Defaults to red. 79 | 80 | [def [cmd ::tkcon::OPT(autoload)]] 81 | Packages to automatically load into the slave interpreter (i.e. 'Tk'). 82 | This is a list. 83 | Defaults to {} (none). 84 | 85 | [def [cmd ::tkcon::OPT(blinktime)]] 86 | The amount of time (in millisecs) that braced sections should blink for. 87 | Defaults to 500 (0.5 secs), must be at least 100. 88 | 89 | [def [cmd ::tkcon::OPT(blinkrange)]] 90 | Whether to blink the entire range for electric brace matching 91 | or to just blink the actual matching braces (respectively 1 or 0, 92 | defaults to 1). 93 | 94 | [def [cmd ::tkcon::OPT(buffer)]] 95 | The size of the console scroll buffer (in lines). 96 | Defaults to 512. 97 | 98 | [def [cmd ::tkcon::OPT(calcmode)]] 99 | Whether to allow expr commands to be run at the command line 100 | without prefixing them with expr (just a convenience). 101 | 102 | [def [cmd ::tkcon::OPT(cols)]] 103 | Number of columns for the console to start out with. 104 | Defaults to 80. 105 | 106 | [def [cmd ::tkcon::OPT(dead)]] 107 | What to do with dead connected interpreters. 108 | If dead is leave, TkCon automatically exits the dead interpreter. 109 | If dead is ignore then it remains attached waiting for the 110 | interpreter to reappear. 111 | Otherwise TkCon will prompt you. 112 | 113 | [def [cmd ::tkcon::OPT(exec)]] 114 | This corresponds to the [cmd -exec] tkcon option (see [cmd tkcon](1)). 115 | 116 | [def [cmd ::tkcon::OPT(font)]] 117 | Font to use for tkcon text widgets (also specified with [cmd -font] option). 118 | Defaults to the system default, or a fixed width equivalent. 119 | 120 | [def [cmd ::tkcon::OPT(gets)]] 121 | Controls whether tkcon will overload the gets command to work with tkcon. 122 | The valid values are: congets (the default), which will redirect 123 | stdin requests to the tkcon window; gets, which will pop up a dialog to 124 | get input; and {} (empty string) which tells tkcon not to overload gets. 125 | This value must be set at startup to alter tkcon's behavior. 126 | 127 | [def [cmd ::tkcon::OPT(history)]] 128 | The size of the history list to keep. 129 | Defaults to 48. 130 | 131 | [def [cmd ::tkcon::OPT(hoterrors)]] 132 | Whether hot errors are enabled or not. 133 | When enabled, errors that are returned to the console are marked 134 | with a link to the error info that will pop up in an minimal editor. 135 | This requires more memory because each error that occurs will 136 | maintain bindings for this feature, as long as the error 137 | is in the text widget. 138 | Defaults to on. 139 | 140 | [def [cmd ::tkcon::OPT(library)]] 141 | The path to any tcl library directories (these are appended 142 | to the [cmd auto_path] when the after the resource file is loaded in). 143 | 144 | [def [cmd ::tkcon::OPT(lightbrace)]] 145 | Whether to use the brace highlighting feature or not 146 | (respectively 1 or 0, defaults to 1). 147 | 148 | [def [cmd ::tkcon::OPT(lightcmd)]] 149 | Whether to use the command highlighting feature or not 150 | (respectively 1 or 0, defaults to 1). 151 | 152 | [def [cmd ::tkcon::OPT(maineval)]] 153 | A tcl script to execute in the main interpreter after the 154 | slave interpreter is created and the user interface is initialized. 155 | 156 | [def [cmd ::tkcon::OPT(maxlinelen)]] 157 | A number that specifies the limit of long result lines. 158 | True result is still captured in $_ (and 'puts $_' works). 159 | Defaults to 0 (unlimited). 160 | 161 | [def [cmd ::tkcon::OPT(maxmenu)]] 162 | A number that specifies the maximum number of packages to 163 | show vertically in the [arg Interp->Packages] menu before breaking 164 | into another column. 165 | Defaults to 15. 166 | 167 | [def [cmd ::tkcon::OPT(nontcl)]] 168 | For those who might be using non-Tcl based Tk attachments, set this to 1. 169 | It prevents TkCon from trying to evaluate its own Tcl 170 | code in an attached interpreter. 171 | Also see my notes for non-Tcl based Tk interpreters. 172 | 173 | [def [cmd ::tkcon::OPT(prompt1)]] 174 | Like [cmd tcl_prompt1], except it doesn't require you use [cmd puts]. 175 | No equivalent for [cmd tcl_prompt2] is available (it's unnecessary IMHO). 176 | Defaults to {([lb]file tail [lb]pwd[rb][rb]) [lb]history nextid[rb] % }. 177 | 178 | [def [cmd ::tkcon::OPT(rows)]] 179 | Number of rows for the console to start out with. 180 | Defaults to 20. 181 | 182 | [def [cmd ::tkcon::OPT(scollypos)]] 183 | Y scrollbar position. 184 | Valid values are left or right. 185 | Defaults to right. 186 | 187 | [def [cmd ::tkcon::OPT(showmenu)]] 188 | Show the menubar on startup (1 or 0, defaults to 1). 189 | 190 | [def [cmd ::tkcon::OPT(showmultiple)]] 191 | Show multiple matches for path/proc/var name expansion (1 or 0, 192 | defaults to 1). 193 | 194 | [def [cmd ::tkcon::OPT(slaveeval)]] 195 | A tcl script to execute in each slave interpreter right after it's created. 196 | This allows the user to have user defined info always available in a slave. 197 | 198 | [para] 199 | Example: 200 | 201 | [example_begin] 202 | set ::tkcon::OPT(slaveeval) { 203 | proc foo args { puts $args } 204 | lappend auto_path . 205 | } 206 | [example_end] 207 | 208 | [def [cmd ::tkcon::OPT(slaveexit)]] 209 | Allows the prevention of exit in slaves from exitting the entire application. 210 | If it is equal to exit, exit will exit as usual, otherwise it will just close 211 | down that interpreter (and any children). 212 | Defaults to close. 213 | 214 | [def [cmd ::tkcon::OPT(subhistory)]] 215 | Allow history substitution to occur (0 or 1, defaults to 1). 216 | The history list is maintained in a single interpreter per TkCon console 217 | instance. 218 | Thus you have history which can range over a series of attached interpreters. 219 | 220 | [list_end] 221 | 222 | [section EXAMPLES] 223 | [para] 224 | An example TkCon resource file might look like: 225 | 226 | [example_begin] 227 | ###################################################### 228 | ## My TkCon Resource File 229 | 230 | # Use a fixed default font 231 | #tkcon font fixed; # valid on unix 232 | #tkcon font systemfixed; # valid on win 233 | tkcon font Courier 12; # valid everywhere 234 | 235 | # Keep 50 commands in history 236 | set ::tkcon::OPT(history) 50 237 | 238 | # Use a pink prompt 239 | set ::tkcon::COLOR(prompt) pink 240 | ###################################################### 241 | [example_end] 242 | 243 | [see_also [cmd tkcon](1)] 244 | [see_also [cmd dump](n) [cmd tkcon](n) [cmd idebug](n)] 245 | [see_also [cmd observe](n)] 246 | [keywords Tk console] 247 | 248 | [manpage_end] 249 | 250 | -------------------------------------------------------------------------------- /docs/todo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | tkcon: To Do Ideas 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
tkcon: To Do Ideas 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 |
DocumentationPurpose & FeaturesLimitationsTo DoLicense
Online Demo 34 | (requires Tk plugin)Using TkCon with other Tk Languages
38 | 39 | 40 |
41 |
42 |

Future Ideas

43 | 44 |
    45 |
  • Add encoding auto-conversion to exec commands 46 |
  • keep history file, also keep history of sourced files 47 |
  • set mimetype(extension,au) "audio/u-law"
     48 | set mimetype(extension,wav) "audio/wave"
     49 | set mimetype(extension,mid) "audio/midi"
     50 | /etc/magic
     51 | proc run {file} {
     52 |     global mimetype
     53 | 
     54 |     if {[file executable $file]} {
     55 |         exec $file
     56 |         return
     57 |     }
     58 | 
     59 |     catch {set mimetype $mimetype(extension,[file extension $file])}
     60 | 
     61 |     if {![info exists mimetype]} {
     62 |         set mimetype $mimetype(magic,[exec /bin/file $file])
     63 |     }
     64 | 
     65 |     exec $mimetype(application,$mimetype) $file
     66 | }
    67 | 68 |
  • Add socket level communication model 69 |
  • Enhance the true debugging capabilities - I'm looking at 70 | tcl-debug and into what I can adopt from the tkInspect philosophy. 71 |
  • I'm taking ideas... 72 |
73 | 74 |

Known Bugs/Quirks

75 | 76 |
    77 |
  • Command highlighting isn't perfect because I try to make it too 78 | efficient. 79 |
  • All interpreters have the same current working directory. This is 80 | a limitation of tcl. 81 |
  • You can't 'attach' on machines where send does not exist. 82 | John Loverso has a comm.tcl 83 | replacement. 84 | In any case, you can still attach to internal interpreters and namespaces. 85 |
  • Need to clean up checkpointed states when the associated interp dies. 86 | Works with slaves, but not foreign interps. 87 |
  • Can't identify non-Tcl or pre-Tk4 interpreters automagically... 88 |
  • You tell me... 89 |
90 | 91 |
92 |
93 | 94 |
95 |
© 96 | Jeffrey Hobbs
97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /icons/tkcon-small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | tkcon 24 | 26 | 33 | 40 | 51 | 61 | 71 | 81 | 92 | 102 | 112 | 122 | 124 | 128 | 132 | 133 | 135 | 139 | 143 | 144 | 146 | 150 | 154 | 155 | 157 | 161 | 165 | 166 | 169 | 173 | 177 | 178 | 188 | 190 | 194 | 198 | 199 | 201 | 205 | 209 | 210 | 212 | 216 | 220 | 221 | 224 | 228 | 232 | 233 | 243 | 245 | 249 | 253 | 257 | 258 | 269 | 272 | 276 | 280 | 281 | 292 | 299 | 300 | 319 | 321 | 322 | 324 | image/svg+xml 325 | 327 | tkcon 328 | 23 Jan 2010 329 | 330 | 331 | Pat Thoyts 332 | 333 | 334 | Tcl feather icon blended with the console icon fron the tango theme icon package. 335 | 336 | 337 | Pat Thoyts, The Tango Project 338 | 339 | 340 | 342 | 343 | 345 | 347 | 349 | 351 | 352 | 353 | 354 | 358 | 362 | 365 | 372 | 377 | 382 | 383 | 392 | 401 | 404 | 408 | 412 | 416 | 420 | 424 | 428 | 432 | 436 | 440 | 444 | 448 | 452 | 453 | 462 | 467 | 472 | 481 | 490 | 499 | 509 | 510 | 515 | 518 | 522 | 527 | 531 | 532 | 533 | 534 | 535 | -------------------------------------------------------------------------------- /icons/tkcon-small48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wjoye/tkcon/9acf6d9c35f71721017c1aa5c887389431dca8ca/icons/tkcon-small48.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Enhanced Tk Console: tkcon 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 19 | 20 |
Enhanced Tk Console: tkcon 15 | 16 | SourceForge Logo 18 |
21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | 35 | 36 | 49 | 50 | 51 |
DocumentationScreenshotOnline Demo! (requires 31 | Tk plugin)License
37 | tkcon Release Archives 39 | 40 |

41 | Latest Release is 2.5 (2009-02-26) 42 |

43 |

44 | You can grab the latest sources from the 46 | tkcon CVS repository. 47 |

48 |
52 | 53 |
54 | 55 |

56 | tkcon is a replacement for the standard console that comes with Tk (on 57 | Windows/Mac, but also works on Unix). The console itself provides 58 | many more features than the standard console. tkcon works on all 59 | platforms where Tcl/Tk is available. It is meant primarily to aid one when 60 | working with the little details inside tcl and tk, giving Unix users the GUI 61 | console provided by default in the Mac and Windows Tk. It's also not a bad 62 | replacement for the default MS-DOS shell (although it needs lots of fine 63 | tuning). 64 |

65 | 66 |
67 |
© Jeffrey Hobbs (jeff at hobbs dot org)
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /install-desktop-menu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # To install a tkcon entry into a FreeDesktop.org compatible menu system such 4 | # as used by GNOME, KDE or most modern X11 desktop environments the tkcon.desktop 5 | # and icons/* files are installed. This should be done using the xdg-desktop-menu 6 | # utility and xdg-icon-resource utility from the xdg-utils package. See 7 | # http://portland.freedesktop.org/xdg-utils-1.0/ for further details. 8 | # 9 | 10 | PROG_XDG_DESKTOP_MENU=`which xdg-desktop-menu` 11 | PROG_XDG_ICON_RESOURCE=`which xdg-icon-resource` 12 | 13 | ICONFILE=icons/tkcon-small48.png 14 | 15 | if [ -x $PROG_XDG_DESKTOP_MENU -a -x PROG_XDG_ICON_RESOURCE ] 16 | then 17 | $PROG_XDG_DESKTOP_MENU install tkcon-console.desktop 18 | $PROG_XDG_ICON_RESOURCE install --size 48 $ICONFILE tkcon-icon 19 | else 20 | [ -d $HOME/.local/share/applications ] || mkdirhier $HOME/.local/share/applications 21 | [ -d $HOME/.local/share/icons ] || mkdirhier $HOME/.local/share/icons 22 | install tkcon-console.desktop $HOME/.local/share/applications/tkcon-console.desktop 23 | install $ICONFILE $HOME/.local/share/icons/tkcon-icon.png 24 | fi 25 | 26 | 27 | -------------------------------------------------------------------------------- /pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # pkgIndex.tcl to use tkcon as a package via 'package require tkcon' 2 | # 3 | # 'tkcon show' will do all that is necessary to display tkcon 4 | # 5 | # Defaults to: 6 | # * the main interp as the "slave" 7 | # * hiding tkcon when you click in the titlebar [X] 8 | # * using '.tkcon' as the root toplevel 9 | # * not displaying itself at 'package require' time 10 | # 11 | package ifneeded tkcon 2.7 [list source [file join $dir tkcon.tcl]] 12 | -------------------------------------------------------------------------------- /tclconfig/README.txt: -------------------------------------------------------------------------------- 1 | These files comprise the basic building blocks for a Tcl Extension 2 | Architecture (TEA) extension. For more information on TEA see: 3 | 4 | http://www.tcl.tk/doc/tea/ 5 | 6 | This package is part of the Tcl project at SourceForge, but sources 7 | and bug/patch database are hosted on fossil here: 8 | 9 | https://core.tcl-lang.org/tclconfig 10 | 11 | This package is a freely available open source package. You can do 12 | virtually anything you like with it, such as modifying it, redistributing 13 | it, and selling it either in whole or in part. 14 | 15 | CONTENTS 16 | ======== 17 | The following is a short description of the files you will find in 18 | the sample extension. 19 | 20 | README.txt This file 21 | 22 | install-sh Program used for copying binaries and script files 23 | to their install locations. 24 | 25 | tcl.m4 Collection of Tcl autoconf macros. Included by a package's 26 | aclocal.m4 to define TEA_* macros. 27 | -------------------------------------------------------------------------------- /tclconfig/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2020-07-26.22; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # 'make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | tab=' ' 45 | nl=' 46 | ' 47 | IFS=" $tab$nl" 48 | 49 | # Set DOITPROG to "echo" to test this script. 50 | 51 | doit=${DOITPROG-} 52 | doit_exec=${doit:-exec} 53 | 54 | # Put in absolute file names if you don't have them in your path; 55 | # or use environment vars. 56 | 57 | chgrpprog=${CHGRPPROG-chgrp} 58 | chmodprog=${CHMODPROG-chmod} 59 | chownprog=${CHOWNPROG-chown} 60 | cmpprog=${CMPPROG-cmp} 61 | cpprog=${CPPROG-cp} 62 | mkdirprog=${MKDIRPROG-mkdir} 63 | mvprog=${MVPROG-mv} 64 | rmprog=${RMPROG-rm} 65 | stripprog=${STRIPPROG-strip} 66 | 67 | posix_mkdir= 68 | 69 | # Desired mode of installed file. 70 | mode=0755 71 | 72 | # Create dirs (including intermediate dirs) using mode 755. 73 | # This is like GNU 'install' as of coreutils 8.32 (2020). 74 | mkdir_umask=22 75 | 76 | chgrpcmd= 77 | chmodcmd=$chmodprog 78 | chowncmd= 79 | mvcmd=$mvprog 80 | rmcmd="$rmprog -f" 81 | stripcmd= 82 | 83 | src= 84 | dst= 85 | dir_arg= 86 | dst_arg= 87 | 88 | copy_on_change=false 89 | is_target_a_directory=possibly 90 | 91 | usage="\ 92 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 93 | or: $0 [OPTION]... SRCFILES... DIRECTORY 94 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 95 | or: $0 [OPTION]... -d DIRECTORIES... 96 | 97 | In the 1st form, copy SRCFILE to DSTFILE. 98 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 99 | In the 4th, create DIRECTORIES. 100 | 101 | Options: 102 | --help display this help and exit. 103 | --version display version info and exit. 104 | 105 | -c (ignored) 106 | -C install only if different (preserve the last data modification time) 107 | -d create directories instead of installing files. 108 | -g GROUP $chgrpprog installed files to GROUP. 109 | -m MODE $chmodprog installed files to MODE. 110 | -o USER $chownprog installed files to USER. 111 | -s $stripprog installed files. 112 | -S OPTION $stripprog installed files using OPTION. 113 | -t DIRECTORY install into DIRECTORY. 114 | -T report an error if DSTFILE is a directory. 115 | 116 | Environment variables override the default commands: 117 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 118 | RMPROG STRIPPROG 119 | " 120 | 121 | while test $# -ne 0; do 122 | case $1 in 123 | -c) ;; 124 | 125 | -C) copy_on_change=true;; 126 | 127 | -d) dir_arg=true;; 128 | 129 | -g) chgrpcmd="$chgrpprog $2" 130 | shift;; 131 | 132 | --help) echo "$usage"; exit $?;; 133 | 134 | -m) mode=$2 135 | case $mode in 136 | *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) 137 | echo "$0: invalid mode: $mode" >&2 138 | exit 1;; 139 | esac 140 | shift;; 141 | 142 | -o) chowncmd="$chownprog $2" 143 | shift;; 144 | 145 | -s) stripcmd=$stripprog;; 146 | 147 | -S) stripcmd="$stripprog $2" 148 | shift;; 149 | 150 | -t) 151 | is_target_a_directory=always 152 | dst_arg=$2 153 | # Protect names problematic for 'test' and other utilities. 154 | case $dst_arg in 155 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 156 | esac 157 | shift;; 158 | 159 | -T) is_target_a_directory=never;; 160 | 161 | --version) echo "$0 $scriptversion"; exit $?;; 162 | 163 | --) shift 164 | break;; 165 | 166 | -*) echo "$0: invalid option: $1" >&2 167 | exit 1;; 168 | 169 | *) break;; 170 | esac 171 | shift 172 | done 173 | 174 | # We allow the use of options -d and -T together, by making -d 175 | # take the precedence; this is for compatibility with GNU install. 176 | 177 | if test -n "$dir_arg"; then 178 | if test -n "$dst_arg"; then 179 | echo "$0: target directory not allowed when installing a directory." >&2 180 | exit 1 181 | fi 182 | fi 183 | 184 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 185 | # When -d is used, all remaining arguments are directories to create. 186 | # When -t is used, the destination is already specified. 187 | # Otherwise, the last argument is the destination. Remove it from $@. 188 | for arg 189 | do 190 | if test -n "$dst_arg"; then 191 | # $@ is not empty: it contains at least $arg. 192 | set fnord "$@" "$dst_arg" 193 | shift # fnord 194 | fi 195 | shift # arg 196 | dst_arg=$arg 197 | # Protect names problematic for 'test' and other utilities. 198 | case $dst_arg in 199 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 200 | esac 201 | done 202 | fi 203 | 204 | if test $# -eq 0; then 205 | if test -z "$dir_arg"; then 206 | echo "$0: no input file specified." >&2 207 | exit 1 208 | fi 209 | # It's OK to call 'install-sh -d' without argument. 210 | # This can happen when creating conditional directories. 211 | exit 0 212 | fi 213 | 214 | if test -z "$dir_arg"; then 215 | if test $# -gt 1 || test "$is_target_a_directory" = always; then 216 | if test ! -d "$dst_arg"; then 217 | echo "$0: $dst_arg: Is not a directory." >&2 218 | exit 1 219 | fi 220 | fi 221 | fi 222 | 223 | if test -z "$dir_arg"; then 224 | do_exit='(exit $ret); exit $ret' 225 | trap "ret=129; $do_exit" 1 226 | trap "ret=130; $do_exit" 2 227 | trap "ret=141; $do_exit" 13 228 | trap "ret=143; $do_exit" 15 229 | 230 | # Set umask so as not to create temps with too-generous modes. 231 | # However, 'strip' requires both read and write access to temps. 232 | case $mode in 233 | # Optimize common cases. 234 | *644) cp_umask=133;; 235 | *755) cp_umask=22;; 236 | 237 | *[0-7]) 238 | if test -z "$stripcmd"; then 239 | u_plus_rw= 240 | else 241 | u_plus_rw='% 200' 242 | fi 243 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 244 | *) 245 | if test -z "$stripcmd"; then 246 | u_plus_rw= 247 | else 248 | u_plus_rw=,u+rw 249 | fi 250 | cp_umask=$mode$u_plus_rw;; 251 | esac 252 | fi 253 | 254 | for src 255 | do 256 | # Protect names problematic for 'test' and other utilities. 257 | case $src in 258 | -* | [=\(\)!]) src=./$src;; 259 | esac 260 | 261 | if test -n "$dir_arg"; then 262 | dst=$src 263 | dstdir=$dst 264 | test -d "$dstdir" 265 | dstdir_status=$? 266 | else 267 | 268 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 269 | # might cause directories to be created, which would be especially bad 270 | # if $src (and thus $dsttmp) contains '*'. 271 | if test ! -f "$src" && test ! -d "$src"; then 272 | echo "$0: $src does not exist." >&2 273 | exit 1 274 | fi 275 | 276 | if test -z "$dst_arg"; then 277 | echo "$0: no destination specified." >&2 278 | exit 1 279 | fi 280 | dst=$dst_arg 281 | 282 | # If destination is a directory, append the input filename. 283 | if test -d "$dst"; then 284 | if test "$is_target_a_directory" = never; then 285 | echo "$0: $dst_arg: Is a directory" >&2 286 | exit 1 287 | fi 288 | dstdir=$dst 289 | dstbase=`basename "$src"` 290 | case $dst in 291 | */) dst=$dst$dstbase;; 292 | *) dst=$dst/$dstbase;; 293 | esac 294 | dstdir_status=0 295 | else 296 | dstdir=`dirname "$dst"` 297 | test -d "$dstdir" 298 | dstdir_status=$? 299 | fi 300 | fi 301 | 302 | case $dstdir in 303 | */) dstdirslash=$dstdir;; 304 | *) dstdirslash=$dstdir/;; 305 | esac 306 | 307 | obsolete_mkdir_used=false 308 | 309 | if test $dstdir_status != 0; then 310 | case $posix_mkdir in 311 | '') 312 | # With -d, create the new directory with the user-specified mode. 313 | # Otherwise, rely on $mkdir_umask. 314 | if test -n "$dir_arg"; then 315 | mkdir_mode=-m$mode 316 | else 317 | mkdir_mode= 318 | fi 319 | 320 | posix_mkdir=false 321 | # The $RANDOM variable is not portable (e.g., dash). Use it 322 | # here however when possible just to lower collision chance. 323 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 324 | 325 | trap ' 326 | ret=$? 327 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null 328 | exit $ret 329 | ' 0 330 | 331 | # Because "mkdir -p" follows existing symlinks and we likely work 332 | # directly in world-writeable /tmp, make sure that the '$tmpdir' 333 | # directory is successfully created first before we actually test 334 | # 'mkdir -p'. 335 | if (umask $mkdir_umask && 336 | $mkdirprog $mkdir_mode "$tmpdir" && 337 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 338 | then 339 | if test -z "$dir_arg" || { 340 | # Check for POSIX incompatibilities with -m. 341 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 342 | # other-writable bit of parent directory when it shouldn't. 343 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 344 | test_tmpdir="$tmpdir/a" 345 | ls_ld_tmpdir=`ls -ld "$test_tmpdir"` 346 | case $ls_ld_tmpdir in 347 | d????-?r-*) different_mode=700;; 348 | d????-?--*) different_mode=755;; 349 | *) false;; 350 | esac && 351 | $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { 352 | ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` 353 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 354 | } 355 | } 356 | then posix_mkdir=: 357 | fi 358 | rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 359 | else 360 | # Remove any dirs left behind by ancient mkdir implementations. 361 | rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null 362 | fi 363 | trap '' 0;; 364 | esac 365 | 366 | if 367 | $posix_mkdir && ( 368 | umask $mkdir_umask && 369 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 370 | ) 371 | then : 372 | else 373 | 374 | # mkdir does not conform to POSIX, 375 | # or it failed possibly due to a race condition. Create the 376 | # directory the slow way, step by step, checking for races as we go. 377 | 378 | case $dstdir in 379 | /*) prefix='/';; 380 | [-=\(\)!]*) prefix='./';; 381 | *) prefix='';; 382 | esac 383 | 384 | oIFS=$IFS 385 | IFS=/ 386 | set -f 387 | set fnord $dstdir 388 | shift 389 | set +f 390 | IFS=$oIFS 391 | 392 | prefixes= 393 | 394 | for d 395 | do 396 | test X"$d" = X && continue 397 | 398 | prefix=$prefix$d 399 | if test -d "$prefix"; then 400 | prefixes= 401 | else 402 | if $posix_mkdir; then 403 | (umask $mkdir_umask && 404 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 405 | # Don't fail if two instances are running concurrently. 406 | test -d "$prefix" || exit 1 407 | else 408 | case $prefix in 409 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 410 | *) qprefix=$prefix;; 411 | esac 412 | prefixes="$prefixes '$qprefix'" 413 | fi 414 | fi 415 | prefix=$prefix/ 416 | done 417 | 418 | if test -n "$prefixes"; then 419 | # Don't fail if two instances are running concurrently. 420 | (umask $mkdir_umask && 421 | eval "\$doit_exec \$mkdirprog $prefixes") || 422 | test -d "$dstdir" || exit 1 423 | obsolete_mkdir_used=true 424 | fi 425 | fi 426 | fi 427 | 428 | if test -n "$dir_arg"; then 429 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 430 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 431 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 432 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 433 | else 434 | 435 | # Make a couple of temp file names in the proper directory. 436 | dsttmp=${dstdirslash}_inst.$$_ 437 | rmtmp=${dstdirslash}_rm.$$_ 438 | 439 | # Trap to clean up those temp files at exit. 440 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 441 | 442 | # Copy the file name to the temp name. 443 | (umask $cp_umask && 444 | { test -z "$stripcmd" || { 445 | # Create $dsttmp read-write so that cp doesn't create it read-only, 446 | # which would cause strip to fail. 447 | if test -z "$doit"; then 448 | : >"$dsttmp" # No need to fork-exec 'touch'. 449 | else 450 | $doit touch "$dsttmp" 451 | fi 452 | } 453 | } && 454 | $doit_exec $cpprog "$src" "$dsttmp") && 455 | 456 | # and set any options; do chmod last to preserve setuid bits. 457 | # 458 | # If any of these fail, we abort the whole thing. If we want to 459 | # ignore errors from any of these, just make sure not to ignore 460 | # errors from the above "$doit $cpprog $src $dsttmp" command. 461 | # 462 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 463 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 464 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 465 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 466 | 467 | # If -C, don't bother to copy if it wouldn't change the file. 468 | if $copy_on_change && 469 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 470 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 471 | set -f && 472 | set X $old && old=:$2:$4:$5:$6 && 473 | set X $new && new=:$2:$4:$5:$6 && 474 | set +f && 475 | test "$old" = "$new" && 476 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 477 | then 478 | rm -f "$dsttmp" 479 | else 480 | # Rename the file to the real destination. 481 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 482 | 483 | # The rename failed, perhaps because mv can't rename something else 484 | # to itself, or perhaps because mv is so ancient that it does not 485 | # support -f. 486 | { 487 | # Now remove or move aside any old file at destination location. 488 | # We try this two ways since rm can't unlink itself on some 489 | # systems and the destination file might be busy for other 490 | # reasons. In this case, the final cleanup might fail but the new 491 | # file should still install successfully. 492 | { 493 | test ! -f "$dst" || 494 | $doit $rmcmd -f "$dst" 2>/dev/null || 495 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 496 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 497 | } || 498 | { echo "$0: cannot unlink or rename $dst" >&2 499 | (exit 1); exit 1 500 | } 501 | } && 502 | 503 | # Now rename the file to the real destination. 504 | $doit $mvcmd "$dsttmp" "$dst" 505 | } 506 | fi || exit 1 507 | 508 | trap '' 0 509 | fi 510 | done 511 | 512 | # Local variables: 513 | # eval: (add-hook 'before-save-hook 'time-stamp) 514 | # time-stamp-start: "scriptversion=" 515 | # time-stamp-format: "%:y-%02m-%02d.%02H" 516 | # time-stamp-time-zone: "UTC0" 517 | # time-stamp-end: "; # UTC" 518 | # End: -------------------------------------------------------------------------------- /tclconfig/license.terms: -------------------------------------------------------------------------------- 1 | This software is copyrighted by the Regents of the University of 2 | California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState 3 | Corporation and other parties. The following terms apply to all files 4 | associated with the software unless explicitly disclaimed in 5 | individual files. 6 | 7 | The authors hereby grant permission to use, copy, modify, distribute, 8 | and license this software and its documentation for any purpose, provided 9 | that existing copyright notices are retained in all copies and that this 10 | notice is included verbatim in any distributions. No written agreement, 11 | license, or royalty fee is required for any of the authorized uses. 12 | Modifications to this software may be copyrighted by their authors 13 | and need not follow the licensing terms described here, provided that 14 | the new terms are clearly indicated on the first page of each file where 15 | they apply. 16 | 17 | IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY 18 | FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 19 | ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY 20 | DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE 21 | POSSIBILITY OF SUCH DAMAGE. 22 | 23 | THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, 24 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE 26 | IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE 27 | NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR 28 | MODIFICATIONS. 29 | 30 | GOVERNMENT USE: If you are acquiring this software on behalf of the 31 | U.S. government, the Government shall have only "Restricted Rights" 32 | in the software and related documentation as defined in the Federal 33 | Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you 34 | are acquiring the software on behalf of the Department of Defense, the 35 | software shall be classified as "Commercial Computer Software" and the 36 | Government shall have only "Restricted Rights" as defined in Clause 37 | 252.227-7014 (b) (3) of DFARs. Notwithstanding the foregoing, the 38 | authors grant the U.S. Government and others acting in its behalf 39 | permission to use and distribute the software in accordance with the 40 | terms specified in this license. 41 | -------------------------------------------------------------------------------- /tkcon-console.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Encoding=UTF-8 3 | Name=tkcon 4 | GenericName=Tk console 5 | Comment=Tk console 6 | Exec=tkcon 7 | Icon=tkcon-icon 8 | Terminal=false 9 | Type=Application 10 | Categories=Development;Utility; 11 | --------------------------------------------------------------------------------