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