Relative Paths in Property Inspector

Mike Kerner MikeKerner at roadrunner.com
Sun Oct 29 21:01:11 EDT 2017


it is related.  As soon as I saw your post I said "gee, that looks
familiar".

On Sun, Oct 29, 2017 at 3:02 PM, Sannyasin Brahmanathaswami via
use-livecode <use-livecode at lists.runrev.com> wrote:

> Backstory:
>
> Sometime back in a round with HQ we got the engine to "remember" relative
> path settings for the filenames of images/players etc.. such that it would
> not default to full path from root on the drive which makes the path unique
> to that user and no longer portable… so "relativity" go supported/sticky in
> different dev scenarios…
>
> so far so good… if you set the filename in an image in a stack that lives
> here:
>
> User/MyDrive/myProject/coolAnimals.livecode
>
> with images here to:
>
> User/MyDrive/myProject/img/thumbs/little-rooster.jpg
>
> # it, obviously works But, 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"
>
> and that also works  though you do need to use "specialFolderPath"
> functions on mobile.
>
> Again, so far so good…
>
> End backstory (please correct anything you see that is wrong)
>
> 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."



More information about the use-livecode mailing list