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