The AppleScript window object in TextMate 1.5.8 (under Mac OS 10.5.6) seems to be broken. I get get the window name and bounds, but not the window document:
tell application "TextMate" to return (document of front window) => NOTHING
Compare this to TextEdit, which has a similar dictionary:
tell application "TextEdit" to return (document of front window) => document "foo.txt" of application "TextEdit"
Am I doing something wrong?
Regards,
Alan