The path to liberation
Moderator: Klaus
-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
The path to liberation
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.
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.
Re: The path to liberation
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.
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.

-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Re: The path to liberation
And on an Android tablet/Phone or an Apple one?
Re: The path to liberation
Since you cannot access "external"* folders on mobile, and Android does NOT have something like a "home" folder, I consider this question "moot" 
* Means folder outside of the applications bundle -> Sandboxing!

* Means folder outside of the applications bundle -> Sandboxing!
Re: The path to liberation
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"
to an expression à la -> specialfolderpath("home" & "/folder in home folder/image.png"
Re: The path to liberation
No bloody good ? I can't really answer your problem with a solution, but I'm really curious if I read the NBG rightrichmond62 wrote:NBG!


-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: The path to liberation
NBG ?
Could also be No Biscuits Generated ?
Could also be No Biscuits Generated ?

-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: The path to liberation
LiveCode does indeed support relative paths. How did you set the image references?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Re: The path to liberation
I set the path via the Properties inspector:
Here's my stack along with the test image so you can try this out on your machine(s) of choice:
-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Re: The path to liberation
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.
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.
Re: The path to liberation
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 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

*Edit 2, Ah, PLUMS ~!

-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Re: The path to liberation
This SHOULD work cross-desktop (Mac/Win/Linux), and has just been made on a Mac:
Here's the stack:
-
- Livecode Opensource Backer
- Posts: 10080
- Joined: Fri Feb 19, 2010 10:17 am
Re: The path to liberation
Indeed: but that is NBG because neither Thou nor I can expect our customer in a dress shopall I did was remove all the path
in Omaha, Nebraska (Her name's "Marlene") to fiddle around with file paths.