Just as Tk has some built-in bitmaps, it might be useful to allow Gnoclto have such functionality. Whilst its easy enough to load graphics from file into both images and pixbufs, there may be times when a developerwant to 'hard-code' something into the the package. Is not a trivialprocess to add such items, the creation of the header is straightforward, but the new options need to be added manually into thegnocl::pixBuf source itself. At present there are only two internal graphics, the Gnocl logo and a pointer. Suggestions are invited as to what other built-in necessary graphics might be required.
At times it's useful to see what values variables hold, or offer some pause point before the code goes elsewhere before causing havoc. Its possible to write output to the terminal but this can get lost in copious forms of other outputs, besides, there's no pausing the script execution either. The following proc creates a custom dialog which displays ad message along with the point in the calling script from which it was invoked. ## simple runtime debugging feedback dialog, alternative to console based gnocl::msg # @param msg message to display # @returns none # proc xxx::msg {txt} { set frame [info frame -1] append msg "Message:\n\n" append msg " $txt \n\n\n" append msg "Called from:\n\n" append msg "Proc:\t[lindex [info level -1] 0]\n" append msg "File:\t[file tail [dict get $frame file]]\n" append msg "Line:\t[dict get $frame line]\n" gnocl::dialog \ -type info \ -text $msg
Comments