[TxMt] Re: Registering images for dialogs

Allan Odgaard mailinglist at textmate.org
Thu Jul 14 11:52:06 UTC 2016


On 13 Jul 2016, at 11:30, Jacob Carlborg wrote:

> 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.

The idea with the image registration is that you register a dictionary 
with _name_ → _path_ pairs and in your pop-up description you use the 
symbolic names.

The advantage of this is that we will only create one `NSImage` per path 
and the popup menu definition can be simpler, i.e. using `symbol` 
instead of `/Users/«name»/Library/Application 
Support/TextMate/Managed/Bundles/«some 
bundle».tmbundle/Support/symbol.pdf` for every single menu item.

Though regarding the former, the command could be updated to 
automatically “register” any image provided as a full path (possibly 
with its hash value to facilitate re-use of images).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160714/10c81ef8/attachment.html>


More information about the textmate mailing list