how do you reference an image from the iPhone Photo Album?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

how do you reference an image from the iPhone Photo Album?

Post by minx » Mon Jul 25, 2011 6:17 am

Hello,
I'm creating an app where use picks several images from their iPhone Photo album and displays them in a selected card in the stack. While I'm able to select and display the images, I can't figure out how to reference and/or store the current image selection for later use. Can someone either point me to an example or command of how to do this?
Thanks!

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: how do you reference an image from the iPhone Photo Album?

Post by Jellicle » Mon Jul 25, 2011 7:06 am

The iOS release notes say that once a user selects an image from the image library: "...a new image object will be created on the current card of the default stack containing the chosen image." So you could refer to the just created image with:

Code: Select all

put the id of image (the number of images) into ImageID 
Once you have the id you can store it in a list or whatever :)

Gerry
Last edited by Jellicle on Tue Jul 26, 2011 1:02 pm, edited 1 time in total.
14" MacBook Pro
Former LiveCode developer.
Now recovering.

minx
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue May 31, 2011 3:47 am

Re: how do you reference an image from the iPhone Photo Album?

Post by minx » Mon Jul 25, 2011 7:20 pm

Thanks Gerry, I'll give it a try!

ctceismc
Posts: 6
Joined: Wed Jul 20, 2011 2:23 am

Re: how do you reference an image from the iPhone Photo Album?

Post by ctceismc » Tue Jul 26, 2011 2:40 am

So how exactly would go about displaying the image from the photo library once you get the ID as you suggested?

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

Re: how do you reference an image from the iPhone Photo Album?

Post by Klaus » Tue Jul 26, 2011 10:35 am

After issuing a "iPhonePickPhoto..." the image is already VISIBLE on the current card and can be addressed by "last image"!

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: how do you reference an image from the iPhone Photo Album?

Post by Jellicle » Tue Jul 26, 2011 1:01 pm

ctceismc wrote:So how exactly would go about displaying the image from the photo library once you get the ID as you suggested?
Just read my previous post - it explains everything :)

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply