Show activity monitor during iphonePickPhoto?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Show activity monitor during iphonePickPhoto?

Post by grovecat » Sun Jun 10, 2012 3:35 am

As it can take several seconds to suck in a photo with iPhonePickPhoto, I would like to display the activity monitor from the time a user selects a photo to when it appears in an image field. The following shows the indicator from when a getPhoto button is pressed, but that is too soon as there is no activity going on while the app waits for the user to pick a photo.

on mouseUp
iphoneActivityIndicatorStart "whitelarge", 900, 100
iphonePickPhoto "library"
put last image into image "pic1"
delete last image
iphoneActivityIndicatorStop
end mouseUp

Putting the activity command immediately after iPhonePickPhoto means it does not appear at all. So is there a way to start the indicator as soon as the user picks a photo?

Cheers
Don

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Show activity monitor during iphonePickPhoto?

Post by Mark » Sun Jun 10, 2012 8:38 am

Hi Don,

Wouldn't it be better in this case to display a fake indicator in the stack window which is overlayed by the iPhonePickPhoto window?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

grovecat
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 99
Joined: Thu Aug 04, 2011 10:32 am

Re: Show activity monitor during iphonePickPhoto?

Post by grovecat » Sun Jun 10, 2012 9:24 am

Hi Mark

Not quite sure what you mean by a fake indicator. What I have done is to use a Send command that initiates the activity indicator three seconds after the user presses the getPic button. This appears on the stack window that shows the photo picker, and approximates the time at which the user will actually select a picture.

However it does not necessarily synchronise precisely with the selection of a picture although it is good enough for practical purposes. All the same, it would be good if I could do what I suggested I wanted in my post.

Cheers
Don

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Show activity monitor during iphonePickPhoto?

Post by Mark » Sun Jun 10, 2012 10:25 am

Don,

A fake indicator is just a gif animation or a sequence of JPEG images that are used as icons for a button. Place those in a group with a 50% gray background and display the group right before you use the picker.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply