Does anyone know if it is possible to use forms in the html output window when running a command?, Id like to use a form to take certain certain user input and pass those values to a perl script hidden inside the language bundle and get the result from that perl script back inside the same html window. This is for a help lookup facility that asks the user to type a search term in and select various scoping options. I can do it using osascript to open an Applescript ask dialog, but I wanted something that was more integrated with TM.
Many thanks to anyone who can suggest something,
Chris
______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
On 18/11/2005, at 14:37, Chris Jenkins wrote:
Does anyone know if it is possible to use forms in the html output window when running a command?
It should be. You'd need to have the FORM post to a javascript, and that script can run normal shell commands via the TextMate.system() method, which mimic that of Dashboard: http://developer.apple.com/ documentation/AppleApplications/Conceptual/Dashboard_Tutorial/Scripts/ chapter_12_section_1.html
The Ruby -> Documentation for Word uses TextMate.system() to call rdoc to get further information (when user clicks a link).
On the bundle repository, there's also Clock [1] in the experimental bundle which starts/stops a process from the HTML output.
In addition to TextMate.system you can also control the progress indicator in the upper right corner using: TextMate.isBusy = true/false.
[1] http://anon:anon@macromates.com/svn/Bundles/trunk/Bundles/ Experimental.tmbundle/Commands/Clock.plist