[TxMt] Re: TMTOOLS and Dialogs written in HTML

Hans-Joerg Bibiko bibiko at eva.mpg.de
Fri Oct 12 09:41:18 UTC 2007


On 12 Oct 2007, at 08:28, Piero D'Ancona wrote:
> Hans-Jörg Bibiko <bibiko at ...> 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: HTMLDIALOG.tmCommand
Type: application/octet-stream
Size: 4276 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20071012/72aad3cd/attachment.tmCommand>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doupper.tmCommand
Type: application/octet-stream
Size: 739 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20071012/72aad3cd/attachment-0001.tmCommand>


More information about the textmate mailing list