Skip to content

Instantly share code, notes, and snippets.

@oatmealraisin
Created October 30, 2020 21:20
Show Gist options
  • Save oatmealraisin/3f520ec4b8755a48bbed4c511eec2925 to your computer and use it in GitHub Desktop.
Save oatmealraisin/3f520ec4b8755a48bbed4c511eec2925 to your computer and use it in GitHub Desktop.
2020-10-30 17:05:15 > oatmealraisin ([email protected]) has joined #tcl
2020-10-30 17:05:15 - Topic for #tcl is "Tcl and Tk | ijchain is a bot bridging a jabber chat | http://www.tcl.tk | http://wiki.tcl.tk | http://paste.tclers.tk | Development http://core.tcl.tk | Dedicated Eggdrop-Tcl help in #eggdrop"
2020-10-30 17:05:15 - Topic set by thommey on Sun, 20 Aug 2017 17:55:57
2020-10-30 17:05:16 - Channel #tcl: 122 nicks (1 op, 0 voices, 121 normals)
2020-10-30 17:05:16 - PvNotice(ChanServ): This channel is bridged to a Jabber chat via ijchain. ijchain is a bot. Set your IRC client for UTF-8 encoding in this channel.
2020-10-30 17:05:16 - URL for #tcl: http://www.tcl.tk
2020-10-30 17:05:17 - Channel created on Sun, 26 Nov 2006 01:42:47
2020-10-30 17:05:49 oatmealraisin Hello, I'm having issues creating a menu for a project called Pure Data. I've identified that the program doesn't start because of an error when creating a menu
2020-10-30 17:06:04 oatmealraisin I'm getting the error 'ErrorMsg: expected integer but got "Mono"'
2020-10-30 17:06:41 oatmealraisin I'm using linux, TK/TCL versions 8.6.10-2
2020-10-30 17:07:19 greycat the error message should help you figure out which command is receiving the wrong data
2020-10-30 17:07:58 dbohdan oatmealraisin: Could you post the relevant source code line?
2020-10-30 17:08:39 oatmealraisin dbohdan: I'll gist the entire file, but it's in pd_menus.tcl:38
2020-10-30 17:09:27 oatmealraisin https://gist.github.com/oatmealraisin/06c400bc285b992dfe4c51bc8b010431
2020-10-30 17:09:35 greycat you're passing the wrong value, so you just have to figure out why
2020-10-30 17:10:34 oatmealraisin greycat: I'm not sure what you mean, this is the error message from a `menu .menubar` line, and it seems that that's the way to create menus?
2020-10-30 17:11:09 oatmealraisin There was no error info. I'm sorry if I'm hard to direct, I've never used TCL/TK, i'm just trying to get a project to run
2020-10-30 17:12:39 < puremouron ([email protected]) has quit (Ping timeout: 260 seconds)
2020-10-30 17:14:09 dbohdan oatmealraisin: The errorInfo you want is a global variable. Access it with $::errorInfo, not $errorInfo.
2020-10-30 17:15:01 dbohdan But that's outdated. In Tcl 8.6 you should instead write something like [try { command ... } on error {msg opts} { puts stderr [list $msg $opts] }].
2020-10-30 17:15:15 oatmealraisin Ohhhh! I know what's happening
2020-10-30 17:15:26 oatmealraisin The 'Mono' it's complaining about is my font definition
2020-10-30 17:15:33 oatmealraisin Which is a monospace font
2020-10-30 17:15:56 oatmealraisin wow
2020-10-30 17:16:18 oatmealraisin dbohdan: that's incredible, thank you so much!
2020-10-30 17:16:23 dbohdan You're welcome!
2020-10-30 17:16:39 dbohdan If you are totally new to Tcl, read this before you proceed: https://learnxinyminutes.com/docs/tcl/
2020-10-30 17:16:42 dbohdan It won't take you long
2020-10-30 17:17:31 oatmealraisin Thanks, finding docs was pretty difficult. Seems the tutorialspoint one is out of date, and the official docs are pretty in the weeds
2020-10-30 17:18:19 oldlaptop there exists an official tutorial: https://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
2020-10-30 17:18:32 oldlaptop the manpages themselves are reference material, as is typical for such things
2020-10-30 17:18:47 oldlaptop but the entire language/environment *is* documented in them, for what that's worth
2020-10-30 17:18:52 oldlaptop including what little syntax exists
2020-10-30 17:19:13 oatmealraisin Right, definitely feels like much of the GNU type projects, man pages are like a car manual hah
2020-10-30 17:19:29 dbohdan That's a grave insult
2020-10-30 17:19:32 oatmealraisin :O
2020-10-30 17:19:43 oldlaptop they're nothing like gnu's nasty little stub "manpages" :P
2020-10-30 17:19:55 oatmealraisin Sorry!
2020-10-30 17:20:08 dbohdan j/k
2020-10-30 17:20:10 oldlaptop "here's a few of the most important flags, go type 'info foo' and stop bothering me"
2020-10-30 17:20:57 oatmealraisin oldlaptop: Thanks #kernel, very cool
2020-10-30 17:21:10 < luser977 ([email protected]) has quit (Read error: Connection reset by peer)
2020-10-30 17:21:11 dbohdan oatmealraisin: http://tkdocs.com/ is a nice introduction to Tk specifically
2020-10-30 17:21:22 > luser977 ([email protected]) has joined #tcl
2020-10-30 17:22:10 oatmealraisin All of these resources are great. I've already added a few modifications to the source to change the colorschemes of a lot of Pd, it's pretty ugly by default
2020-10-30 17:22:15 ischain <kbk> Well, I've gone and done it. If anyone still has mailto:[email protected] ([email protected]) in their contact list, that avatar is no more - I've officially entered the ranks of the retired.
2020-10-30 17:22:30 oldlaptop tkdocs doesn't show off https://www.tcl.tk/man/tcl8.6/TkCmd/grid.htm#M28 though! :(
2020-10-30 17:23:00 < luser977 ([email protected]) has quit (Read error: Connection reset by peer)
2020-10-30 17:23:04 > luser978 ([email protected]) has joined #tcl
2020-10-30 17:23:30 ischain <kbk> Once I've had some time to rest and regroup, you might begin to see some more Tcl activity from me. 🙂
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment