Hi Mariano, > Le 27 nov. 2017 à 03:08, Mariano Martinez Peck <[email protected]> a > écrit : > > Hi guys, > > Thank you Christophe for continue pushing this useful tool! > > One small request which might be easy to do... Quite frequently I want to do > something and re-save an image I have previosuly saved as a custom template > (under Local root tree). Right now what I have to do so: > > 1) Make a new image from that template > 2) remove template > 2) do the thing and save the opened image. > 3) go back to laucher and save that image as a new template (with the same > name of the one I deleted) > 4) delete the created image > > All that would be simplified if I could also launch my local templates. Is > there any reason why is that not allowed? (at least for Local tree).
I needed to get a bit into the code to see what is done. In PharoLauncher, when you download a template from the we, the template is stored in a folder (e.g. /Users/john/Library/Preferences/pharo/templateCache/) as well as some metadata for it. PhLLocalTemplate class is used to build a list of locally available templates from the metadata file store in this folder. As this folder is intended to be a cache, that’s why you cannot run it directly. You first need to unzip the template, create its metadata file. Maybe an action on images: « create template from image and delete image » would help you (if it allows overriding of an existing template)? You also have a « recreate » action on images able to recreate the image from the specified origin template. Christophe
