Relative Paths in Property Inspector

Mike Kerner MikeKerner at roadrunner.com
Sun Oct 29 22:46:56 EDT 2017


What I meant was not that you shouldn't file a QR, but that I think that
all the requests for relative paths should be combined because I think
relative paths across LC would be beneficial.  Sorry for not being clear
about that.
I have four obvious cases, where I see a benefit:
1) Using multiple machines - unless usernames are the same, absolute paths
won't be the same
2) Using multiple platforms.
3) Using network syncing tools.  If I use a syncing tool, the absolute
paths won't match, either, unless both the username and the os are the same
4) Using network file storage.  The path for syncing and storage won't be
the same - for example, if on a lappie you use a network file storage tool
to save disk space, the path will start with a network drive letter.  If
you use a syncing tool for the same service on a desktop, the path will
start with some local drive and will be at least one level deeper.

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

> 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
>
> _______________________________________________
> 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