Page 1 of 1

Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 9:14 pm
by erikbleifieldBUSpxdS
I have been having this issue in the licensed versions of 6.5.2 and with 6.6. I add images to the stack using the Image Area control and then view them in the iOS simulator. Usually my first one or two images will work the first time I run them in the simulator, but after that they stop showing up and I cannot find any way to restore them.

Is anyone else seeing this issue? Anyone know of a work around?
Inage Control.png

Thanks,

Erik

Re: Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 9:31 pm
by erikbleifieldBUSpxdS
I should mention that the images do not re-appear when I deploy to a real iOS device either.

Re: Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 9:47 pm
by Klaus
Hi Erik,

1. welcome to the forum! :D
2. are these imported or referenced (to image file on disk) images?
Then it may be a path problem.


Best

Klaus

Re: Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 9:59 pm
by erikbleifieldBUSpxdS
All images have been referenced. I wonder why some work and some do not.

I can look at importing and see if that changes the behavior.

Re: Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 10:08 pm
by erikbleifieldBUSpxdS
Imported images appear to be working properly/normally/as desired!!!

Thanks for the quick resolution!

Re: Issue with Image Control and iOS

Posted: Mon Feb 24, 2014 10:57 pm
by Klaus
Hi Erik,

sure, imported images are always found, referenced images may not 8)
The trick is to use RELATIVE (to the stack) pathnames for images!

Example:
1. you have a stack "myapp.livecode" in a folder named "myapp"
2. put all the images fro this app into a subfolder (looks cleaner and more PRO :D ) of that folder e.g. -> myapp/images
3. Now you can create image objects and set their filename manually to e.g. -> images/image1.jpg
Since the engine will search referenced files at first in the folder where the stack resides, it will find a folder "images" and the image in it.
4. This will already work fine in the IDE!
5. in the standalone builder settings under "Copy files", add that folder "images" and all images will always be visible in the stack/standalone

You get the picture :D


Best

Klaus