Been working on the prototypes of these two new command options over the past couple of days and have almost come to an end. The idea is to be able to capture a screen or window under script control. I At the back of my mind I had a list of functions that might be useful to someone creating a screencam type movie file but I think that such a project would require the creation of a custom package rather than something more general purpose as gnocl is intended to be. But, the functionality will be there, plus its allowed me more opportunity to tinker around with Cairo.
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