tkcon(3tk)

πŸ’– tkcon β€” Controlling TkCon console πŸ’–

okay bestie, welcome to tkcon, manual section 3tk β€” this is the whole control panel for your TkCon console and honestly? it's giving main character energy. πŸŽ€


✨ SYNOPSIS ✨

tkcon attach interpreter

tkcon buffer ?size?

tkcon bgerror ?msg errorInfo?

tkcon close or tkcon destroy

tkcon congets

tkcon console args

tkcon error

tkcon find string ?-case TCL_BOOLEAN -regexp TCL_BOOLEAN?

tkcon font ?fontname?

tkcon gets

tkcon getcommand

tkcon hide

tkcon history ?-newline?

tkcon iconify

tkcon linelength ?value?

tkcon load filename

tkcon main ?arg arg ...?

tkcon master args

tkcon new

tkcon resultfilter ?command?

tkcon save ?filename ?type??

tkcon set var ?value?

tkcon append var ?value?

tkcon lappend var ?value?

tkcon show or tkcon deiconify

tkcon slave ?slavename ?arg arg ...??

tkcon title ?title?

tkcon version

🌸 DESCRIPTION 🌸

so like β€” this is your ✨entire✨ remote control for a console. lots of useful control over a console, that's the vibe. let's go through it one by one, no skipping, fr fr:

  • tkcon attach interpreter β€” hooks your tkcon up to the interpreter you name. πŸͺ„ that name has to be whatever [tk appname] gave back, or a legit path to a slave interpreter. lowkey the best way to do this is through the Console->Attach Console menu, just saying. πŸ’…
  • tkcon buffer ?size? β€” sets or asks about the allowed size of the console text widget, measured in lines. once you go over that number the text widget auto-deletes the leading lines for you (read: this is literally the scroll buffer size, bestie). πŸ“
  • tkcon bgerror ?msg errorInfo? β€” does the bgerror stuff, but in the tkcon master interpreter. ✨
  • tkcon close or tkcon destroy β€” destroys this tkcon widget. πŸ’€ gone. poof.
  • tkcon congets β€” acts like the classic Tcl gets, except instead of stdin it uses the tkcon console window. 🫢 by default tkcon swaps the standard gets out for this command. you can control that behavior by changing the ::tkcon::OPT(gets) parameter at startup. do not call this one directly β€” rely on the overloaded gets instead, it supports the optional varName parameter. periodt.
  • tkcon console args β€” passes the args straight to the tkcon text widget (the console itself). πŸŽ€
  • tkcon error β€” pops up a dialog giving you the full trace of the last error the tkcon console received. full receipt, no crumbs. 😭
  • tkcon find string ?-case TCL_BOOLEAN -regexp TCL_BOOLEAN? β€” highlights every instance of string in the console. if string is empty, it clears out any previous highlighting. πŸ”βœ¨
  • tkcon font ?fontname? β€” sets or returns the font used by the tkcon text widgets. πŸ–‹οΈ iconic.
  • tkcon gets β€” acts like the classic Tcl gets, except it doesn't need stdin β€” it pops a dialog box up for the user instead. the overloaded gets supports the optional varName parameter. πŸ¦‹
  • tkcon getcommand β€” a variation of the congets method that won't return until a whole full command has been input. ⌨️
  • tkcon hide β€” withdraws the tkcon display from the screen. > bestie. please make sure you have a way to get it back first. πŸ™ˆ
  • tkcon iconify β€” iconifies the tkcon display. tiny little window era. 🌸
  • tkcon history ?-newline? β€” displays the tkcon history in sourceable form. if -newline is specified, it separates each command with an extra newline. πŸ“œ
  • tkcon linelength ?value? β€” sets or displays the number that specifies the limit of long result lines. the true result is still captured in $_ (and puts $_ works, so you're covered πŸ’…).
  • tkcon load filename β€” sources the named file into the slave interpreter. if you don't give a filename, it'll try to call tk_getOpenFile to pop up the file select box. πŸ“‚
  • tkcon main ?arg arg ...? β€” passes the args to the main tkcon interpreter to be evaluated, then returns the result. ✨
  • tkcon master args β€” passes the args to the master interpreter to be evaluated, then returns the result. πŸ‘‘
  • tkcon new β€” creates a brand new tkcon widget. 🌈
  • tkcon resultfilter ?command? β€” picks a command to process results before they get output to the console window. that command gets one argument (the result string), and whatever string it hands back is what gets placed in the console. πŸŽ€
  • tkcon save ?filename ?type?? β€” saves the console buffer to the given filename. no filename? it'll try to call tk_getSaveFile to pop up the file select box. no type? a dialog will ask you which portion of the text you want to save. πŸ’Ύ
  • tkcon set var ?value? β€” queries or sets a master interpreter variable. 🫢
  • tkcon append var ?value? β€” just like set, but it uses append on the variable. 🧚
  • tkcon lappend var ?value? β€” just like set, but it uses lappend on the variable. πŸ’œ
  • tkcon show or tkcon deiconify β€” puts tkcon back up on the screen. she's back. πŸ’…
  • tkcon slave ?slavename ?arg arg ...?? β€” called with no args, it returns the name of all the tkcon interpreters. otherwise, given an interp name, it passes the args to that named interpreter to be evaluated and returns the result. if no args are passed, it returns the [tk appname] of that interpreter. 🌟
  • tkcon title ?title? β€” sets or returns the title for tkcon. nameplate update, slay. πŸŽ€
  • tkcon version β€” returns of version of tkcon. (that's exactly what it says, and we love it 🫢)

πŸ¦‹ SEE ALSO πŸ¦‹

dump(3tk), observe(3tk), tkcon(1), tkcon(3tk), tkconrc(5)


πŸ‘‘ KEYWORDS πŸ‘‘

Tk, console, debug


Copyright (c) Jeffrey Hobbs <jeff at hobbs.org>


and that's the whole page, bestie β€” this was TkCon, version 2.5, and you just read tkcon(3tk). go forth and control that console. no cap. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from