[TxMt Plugins] Dialog API improvements

Hans-Jörg Bibiko bibiko at eva.mpg.de
Thu Sep 20 16:01:48 UTC 2007


my FIRST thought is something like that:

tm_dialog LISTTOKENS

tm_dialog UPDATETOKEN <token>

tm_dialog CLOSETOKEN <token>

tm_dialog WAITFORTOKEN <token>

tm_dialog SHOW PopupMenu WITH '{menuItems={title=A;};}'

tm_dialog SHOW RequestString WITH '{prompt=A;string=Hello;}' AS  
'centered modal'

tm_dialog SHOW OpenPanel AS 'modal centered' ADD Accessory.nib WITH  
tm_dialog WITH '{...}' SHOW OpenPanel AS 'modal centered'

tm_dialog SHOW SavePanel ADD Accessory.nib WITH '{...}' AS modal

tm_dialog SHOW InteractivePopupMenu WITH 'suggestions=(...);' AS  
'modal quiet'

tm_dialog SHOW HTMLTooltip WITH '{...}'

tm_dialog SHOW MyNib ASYNC CREATENEWITEMS '{...}' AS 'centered'  
tm_dialog AS centered SHOW MyNib CREATENEWITEMS '{...}' ASYNC

So you write a kind of an English sentence with variable word order.

The entire arguments could be parsed into a NSDictionary and sent to  
the 'super class' to dispatch.



More information about the textmate-plugins mailing list