Hi.
I'm STILL struggling to get into the Livecode workflow for iOS.
When I import a referenced image singly, its filename is relative to the stack e.g:
"./Media/WebImages/thisImage.jpg"
Great.
However, when I import a referenced folder full of images (New Referenced Control/All images in folder...) its filename is absolute e.g:
"/Users/Paul/Documents/CurrentJobs/Development/Media/WebImages/thisImage.jpg"
Not great.
It means it looks fine in authoring (images appear), and in the simulator (images appear) but not when testing on hardware (no images - grey box instead). What gives? Why should this be any different? If I import them singly they work as expected, but I cannot waste my time doing this - there are lots of images! BTW I have the entire Media folder included in the Copy Files tab of the Standalone Application Settings. I feel like an idiot asking such simple questions here! Apologies.
Kind regards, Paul.
Copying referenced images from a folder vs importing singly
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 44
- Joined: Wed Feb 13, 2013 3:38 pm
- Contact:
Re: Copying referenced images from a folder vs importing sin
Paul...
importing the folder full of images into your app through the 'copy files' pane will place them in the 'engine' folder... so the path on the device would be:
Dixie
importing the folder full of images into your app through the 'copy files' pane will place them in the 'engine' folder... so the path on the device would be:
Code: Select all
specialFolderPath("engine")/CurrentJobs/Development/Media/WebImages/thisImage.jpg
Re: Copying referenced images from a folder vs importing sin
Hi Paul,
With Dixie's post I guess you should set up a custom (or global) property:
hmmm actually, I wonder what the path is in the simulator but you get what I mean.
Simon
With Dixie's post I guess you should set up a custom (or global) property:
Code: Select all
on preOpenCard
if the environment is "development" then put "/Users/Paul/Documents/CurrentJobs/Development/Media/WebImages/" into imagePath
else
put "specialFolderPath("engine")/CurrentJobs/Development/Media/WebImages/" into imagePath
end if
end preOpenCard
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Copying referenced images from a folder vs importing sin
In the general pane of preferences, there's a setting named "always use absolute paths for images". If it's on, does it help if you turn it off?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 44
- Joined: Wed Feb 13, 2013 3:38 pm
- Contact:
Re: Copying referenced images from a folder vs importing sin
Thanks. Although this doesn't explain why both methods are not identical. Seems counter-intuitive.
Kind regards, Paul.
Kind regards, Paul.