On 12 Oct 2007, at 08:28, Piero D'Ancona wrote:
Hans-Jörg Bibiko <bibiko@...> writes:
Now I can write quite easily my own dialog/menu/monitor in HTML, meaning a tmCommand with output 'ShowAsHTML', with my favorite tasks.
That's impressive. Can you post a code example?
I just uploaded the new version 0.901
Download: http://email.eva.mpg.de/~bibiko/downloads/textmate/TMTools.tmplugin.zip
Help: http://email.eva.mpg.de/~bibiko/downloads/textmate/tmtoolshelp.html
or
"$TMTOOLS" help me
For changes 'go to Release Notes'.
As attachment I send two tmCommands illustrating what I'm doing. HTMLDIALOG is only a "fast written EXAMPLE"! But it should show the principals. The tmCommand doupper is needed by HTMLDIALOG's 'uppercase'.
In HTMLDIALOG I set up -a get function -call a bundle item- -uppercase -live monitoring of the current scope -insert a string with the content of an HTML input field -show a string as Tooltip inside of TM's document with the content of an HTML input field
Basically I use HTML to set up the design, and JavaScript to call TM via the bridge TextMate.system().
The only tiny hook is that TM beeps if I switch from the HTML window back to the front most TM window, in order to get TMTOOLS working. I use the shell command: open "txmt://open?"
I do leave out line and column in order to avoid that TM looses its selection. If someone has a better idea, please let me know.
Comments are welcomed!
--Hans