Relative Paths in Property Inspector

Sannyasin Brahmanathaswami brahma at hindu.org
Sun Oct 29 22:30:41 EDT 2017


BR: are you keeping your stacks next to the images?

like this

~/Dropbox/Pet Project/animals.livecode
~/Dropbox/Pet Project/img/dangerous-pets/tiger.jpg

and if you set the image filename to "img/dangerous-pets/tiger.jpg"  

it fails?

---------- 

Mike Kerner wrote:

    it is related.  As soon as I saw your post I said "gee, that looks
    familiar".
    
Brahmanathaswami wrote:
    
[snip] now you can
    >
    > a) manually chop of the lead down to this in the property inspector
    >
    > img/thumbs/little-rooster.jpg
    >
    > # and it works… this is also portable if you include "img/*" in the
    > stackfiles when create your standalone and the filename is saved relative
    > to the stack, and, assuming you keep the folder structure intact you don't
    > have to even mess with defaultfolder or even specialFolderPath("engine")
    > because the "relativity" of the path is respected in any and all contexts
    > (I think…)
    >
    > so you can also programatically do this
    >
    > set the filename of img "myPet" to "img/thumbs/little-rooster.jpg"
    
    > So, why can't we just a relative path in the Property Inspector itself?
    > The browser tool will always return full path from User down to the
    > "asset.jpg"… if I send that stack to someone else, or use a GIT work flow
    > where these stacks are "pure views" (i.e. no actual imported images
    > anywhere)  along with the images. the paths are broken.  So, long way of
    > asking:
    >
    > Do we need an enhancement request for a check box in the PI to set the
    > path as relative to the stack? Seems like that would be super usefu
    >
    > Mikey has this request in since May '16… which feels related
    >
    > http://quality.livecode.com/show_bug.cgi?id=17705
    >
    > but the suggestion for having this in the PI seems a bit different, and
    > might not actually solve his issue for using a cloud instance of his
    > project.
    >
    > Brahmanathaswami
    >
    >
    >
    >
    >
    > _______________________________________________
    > use-livecode mailing list
    > use-livecode at lists.runrev.com
    > Please visit this url to subscribe, unsubscribe and manage your
    > subscription preferences:
    > http://lists.runrev.com/mailman/listinfo/use-livecode
    
    
    
    
    -- 
    On the first day, God created the heavens and the Earth
    On the second day, God created the oceans.
    On the third day, God put the animals on hold for a few hours,
       and did a little diving.
    And God said, "This is good."
    _______________________________________________
    use-livecode mailing list
    use-livecode at lists.runrev.com
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list