The path to liberation

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

The path to liberation

Post by richmond62 » Sun Oct 29, 2017 7:04 pm

If only . . .

I made a quickie standalone last night on my 2006-ish iMac with a few pictures stored in a folder
called "PIX" inside my home folder:

/richmondmathewson/PIX/stupid.png

carted the thing over to a Linux box at my school and dumped the PIX folder in the equivalent place there:

/MAGWITCH/PIX/stupid.png

and: NBG!

SO; as a very large number of programming language seem to be able to cope with that sort of move, I wonder
why LiveCode cannot . . .

1. The nature of the language (wow; there's a can of worms) STOPS that being implemented.

2. The LiveCode engineers HAVEN'T implemented it because:

2.1. It would be an extremely long and time-consuming bit of work.

2.2. The "Gods of Rock and Roll" don't think it is important.

HOWEVER: it IS important, and it's not just me.

Klaus
Posts: 10160
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: The path to liberation

Post by Klaus » Sun Oct 29, 2017 7:49 pm

No wonder if you set a (more or less) absolute pathname!

Why don't you use -> specialfolderpath("home") (or -> $HOME for *NIX based OSses) to set the image path? That will work on all desktop platforms. 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Sun Oct 29, 2017 7:51 pm

And on an Android tablet/Phone or an Apple one?

Klaus
Posts: 10160
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: The path to liberation

Post by Klaus » Sun Oct 29, 2017 8:03 pm

Since you cannot access "external"* folders on mobile, and Android does NOT have something like a "home" folder, I consider this question "moot" :D

* Means folder outside of the applications bundle -> Sandboxing!

Klaus
Posts: 10160
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: The path to liberation

Post by Klaus » Sun Oct 29, 2017 8:22 pm

Maybe this would be a good enhancement request to set an image/audio/video pathname
to an expression à la -> specialfolderpath("home" & "/folder in home folder/image.png"

bogs
Posts: 1896
Joined: Sat Feb 25, 2017 10:45 pm

Re: The path to liberation

Post by bogs » Sun Oct 29, 2017 9:20 pm

richmond62 wrote:NBG!
No bloody good ? I can't really answer your problem with a solution, but I'm really curious if I read the NBG right :P
Image

mrcoollion
Posts: 319
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: The path to liberation

Post by mrcoollion » Mon Oct 30, 2017 11:04 am

NBG ?

Could also be No Biscuits Generated ? :mrgreen:

bogs
Posts: 1896
Joined: Sat Feb 25, 2017 10:45 pm

Re: The path to liberation

Post by bogs » Mon Oct 30, 2017 11:59 am

...biscuits...mmmmm...
Image

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6025
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: The path to liberation

Post by FourthWorld » Mon Oct 30, 2017 3:21 pm

LiveCode does indeed support relative paths. How did you set the image references?
Richard Gaskin
Community volunteer LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems: http://FourthWorld.com
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Mon Oct 30, 2017 7:33 pm

Nicely Boiled Greengages

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Mon Oct 30, 2017 8:01 pm

I set the path via the Properties inspector:
HighwayToHell.gif
Here's my stack along with the test image so you can try this out on your machine(s) of choice:
RelativeP.zip
(12.9 KiB) Downloaded 30 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Mon Oct 30, 2017 8:10 pm

This:

http://lessons.livecode.com/m/2592/l/12 ... ative-path

seems difficult to understand.

But this:

http://livecode.wikia.com/wiki/Using_relative_paths

seems a bit easier to understand.

bogs
Posts: 1896
Joined: Sat Feb 25, 2017 10:45 pm

Re: The path to liberation

Post by bogs » Mon Oct 30, 2017 8:24 pm

richmond62 wrote:
Mon Oct 30, 2017 7:33 pm
Nicely Boiled Greengages
Awesome, going to go look up 'greengages' now !

Dunno about the path issue you have on mac to linux, all I did was remove all the path except for the file name from the [source] box, and proceeded to move the relative folder all over my system (linux).
Image
Image came up every time with no other modification, in the IDE.

*Edit, I also saved it in legacy 5.5 format, took me a while to realize the lowest vers. of Lc I had that could open it was 7.x :shock:
*Edit 2, Ah, PLUMS ~!
Image

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Mon Oct 30, 2017 8:52 pm

This SHOULD work cross-desktop (Mac/Win/Linux), and has just been made on a Mac:
HighwayToHell2.jpg
Here's the stack:
RelativeP2.zip
(14.04 KiB) Downloaded 29 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 2587
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: The path to liberation

Post by richmond62 » Mon Oct 30, 2017 9:00 pm

all I did was remove all the path
Indeed: but that is NBG because neither Thou nor I can expect our customer in a dress shop
in Omaha, Nebraska (Her name's "Marlene") to fiddle around with file paths.
xyz.jpg
Marlene
xyz.jpg (8.49 KiB) Viewed 1089 times

Post Reply

Return to “Feature Requests”