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
On Mar 17, 2009, at 11:48 AM, Alan Watson wrote:
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
You could do this:
tell application "TextMate" get name of front window
or
tell application "TextMate" get name of front document
Best, Charles
Thanks for your reply.
Yes, "get front document" seems to work as "get document of front window". However, the TextMate AppleScript dictionary lists "document" as a property of "window". So it seems that either the AppleScript window object is broken (because "document of front window" doesn't work) or the dictionary is wrong.
Regards,
Alan