Code by Kevin
   


About
Code by Kevin: Programming, code, business, and other pursuits

Your Host
Kevin Walzer, software developer.

Home

Subscribe to RSS Feed
Get a syndicated feed of my weblog.

Archives
2012
2011
2010
2009
2008
2007
2006

Categories
Business
Software
General

        home
Tue, 10 Aug 2010

Further reconsiderations of "good enough"

A few months ago I wrote that I was unhappy with certain aspects of my programs, and would spend time improving them. Of course any developer will spend time trying to improve the products he or she develops, but the reason I have to weigh the benefits of these specific improvements is that they are platform improvements--advances in the underlying toolkit that I use to develop my applications--rather than application-specific features. For instance, earlier this year I spent a lot of time developing basic drag-and-drop capabilities for the toolkit my programs use, and also developing hooks to access the Mac Services menu from my programs. These are features that I can roll into all of my programs and they enhance the user experience of my programs, but they do not extend what the application itself can do.

I had planned to move away from platform improvements--which some call, sardonically, shaving yaks--but I an still unhappy with certain platform aspects of my programs, specifically AppleScript support and printing support. I had declared these good enough, but they really aren't. As a result, I'm back to shaving yaks.

Here's an overview of what I'm updating:

  • AppleScript. I'm modernizing the ancient TclAppleScript package, which allows Tcl/Tk programs to execute AppleScripts directly rather than going through the command-line "osascript" tool. The TclAppleScript package, as currently released, won't build under 64-bit because it contains a great deal of code that is no longer supported. I've recently commited a number of changes to the program's source code repository that allows it to build under 64-bit, and also simplifies what the library does (since many of its functions have apparently never been used, and which no longer are supported anyway). When this updated library is released, it should allow more robust execution of AppleScript, an important tool for communicating with other Mac applications and OS X itself, from Tcl/Tk programs. (As a complement to this project, Jon Guyer has also recently done a 64-bit update of his important Tcl Apple Events library, which allows Tcl applications to access Apple Events--the underlying system mechanism of AppleScript--at a low level. Among other things, the TclAE package allows you to implement an AppleScript dictionary for Tcl/Tk programs, which means that they can be communicated with via native AppleScript just as other popular Mac programs like iTunes are. Thank you, Jon!)
  • Printing. I've written before about implementing printing in my programs, and how I've opted to utilize the Mac's built-in command-line tools to support printing. In the past I've judged the amount of work required to support native printing--either by updating the MacCarbonPrint package by the late Mats Bengtsson or by implementing my own Cocoa-based package--to be greater than the potential benefit. However, my opinion of this has changed, especially as my applications have gained more platform-native integration. While the output of "lpr" is perfectly acceptable, and I've developed a nice, polished printing dialog, it's still not native--a rather glaring contrast to other parts of my programs. As a result, I've begun developing a simple library package that combines Cocoa printing dialogs with Apple's Core Printing framework to send file data directly to the printer. It's not a complete printing solution--in fact, it works almost identically to my current approach of writing file data to disk and sending that file to the printer via lpr--but it's nearing completion, and it will make use of native dialogs. (I had started this project with the idea of updating the MacCarbonPrinting package, but I've run into too many issues in trying to get it to work--a better developer than me will have to complete that project.)

These two projects, which I've been working on for the past month, represent the last items on my list of improvement opportunities for Tcl/Tk native integration on the Mac--at least, the last two areas that I see within my current capabilities. I hope to do official releases of them soon, and then get back to application development--and leave yak-shaving behind for a good, long time. At that point, Tcl/Tk will truly be "good enough."

[/general] permanent link