[TxMt] Re: Registering images for dialogs

Jacob Carlborg doob at me.com
Sat Jul 16 17:05:56 UTC 2016

On 2016-07-15 09:58, Allan Odgaard wrote:

> Don’t you need some sort of mapping? Or does your completion code deal
> in absolute paths to images when it classifies the candidates for the
> completion menu?

Yes, I need to map the result from the completion tool a path, but with 
the current API it's necessary to map a symbolic name to a path as well. 
That means to sets of mappings.

> Yes, the register command adds the image to the cache using their
> symbolic names, and the pop-up menu definition uses the symbolic names
> to reference the images.
> But this indirection is what you are arguing for removing, so I don’t
> get this part.

I was thinking of just using the full path as the key.

>     It would also make the dialog command simpler because the register
>     command could be removed.
> The register command was also intended to be usable before loading nibs
> (with images).
>     (sorry for the rant).
> As I said: /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)/ so while you felt it necessary to rant is
> beyond me.

For some reason I though you were referring to the register command. 
That's my mistake, I apologize.

/Jacob Carlborg

More information about the textmate mailing list