Issue with Image Control and iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
erikbleifieldBUSpxdS
Posts: 7
Joined: Sun Jan 06, 2013 3:20 am

Issue with Image Control and iOS

Post by erikbleifieldBUSpxdS » Mon Feb 24, 2014 9:14 pm

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

erikbleifieldBUSpxdS
Posts: 7
Joined: Sun Jan 06, 2013 3:20 am

Re: Issue with Image Control and iOS

Post by erikbleifieldBUSpxdS » Mon Feb 24, 2014 9:31 pm

I should mention that the images do not re-appear when I deploy to a real iOS device either.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Issue with Image Control and iOS

Post by Klaus » Mon Feb 24, 2014 9:47 pm

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

erikbleifieldBUSpxdS
Posts: 7
Joined: Sun Jan 06, 2013 3:20 am

Re: Issue with Image Control and iOS

Post by erikbleifieldBUSpxdS » Mon Feb 24, 2014 9:59 pm

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.

erikbleifieldBUSpxdS
Posts: 7
Joined: Sun Jan 06, 2013 3:20 am

Re: Issue with Image Control and iOS

Post by erikbleifieldBUSpxdS » Mon Feb 24, 2014 10:08 pm

Imported images appear to be working properly/normally/as desired!!!

Thanks for the quick resolution!

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Issue with Image Control and iOS

Post by Klaus » Mon Feb 24, 2014 10:57 pm

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

Post Reply