<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 13 Jul 2016, at 11:30, Jacob Carlborg wrote:</p>
<p dir="auto"></p></div>
<div style="white-space:pre-wrap"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div dir="auto">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.
</div></blockquote></div>
<div style="white-space:normal">
<p dir="auto">The idea with the image registration is that you register a dictionary with <em>name</em> → <em>path</em> pairs and in your pop-up description you use the symbolic names.</p>
<p dir="auto">The advantage of this is that we will only create one <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">NSImage</code> per path and the popup menu definition can be simpler, i.e. using <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">symbol</code> instead of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">/Users/«name»/Library/Application Support/TextMate/Managed/Bundles/«some bundle».tmbundle/Support/symbol.pdf</code> for every single menu item.</p>
<p dir="auto">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).</p>
</div>
</div>
</body>
</html>