[TxMt] Registering images for dialogs

Jacob Carlborg doob at me.com
Wed Jul 13 09:30:19 UTC 2016


I'm working on adding support for autocomplete to the D bundle. I'm 
using the Ruby method "TextMate::UI.complete" to display the completion 
result. This UI supports displaying images in the list of the results, 
first it took me a while to figure out that the images needs to be 
registered using the dialog command.

Now the question is why is this necessary? I looked in the source code 
for the dialog command and it looks like the register action/sub command 
creates NSImages of the given paths. I was thinking that the "popup" 
dialog command could automatically register the images.

As far as I know it's not possible to automatically execute a bundle 
command ones, so the completion command needs to register the images 
every time because it doesn't know if the images have already been 
registered.

-- 
/Jacob Carlborg



More information about the textmate mailing list