[TxMt] Re: Registering images for dialogs
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
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
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...
More information about the textmate