mobilePickPhoto and "last image" statement
Posted: Sun Dec 30, 2012 3:52 pm
Hi all, I'm using a button to show an image chosen by the user (imageButton). The first time you use the handler all goes fine, but he second time you use the handler, the icon of the button "imageButton" remains the one of the first image. Is there a kind LiveCode guru that tells me what I'm doing wrong?
Code: Select all
global photoSource
on mouseUp
put "library" into photoSource
pickPhoto
end mouseUp
on pickPhoto
put the loc of graphic "shoppingPhoto" of cd "content" into theLoc
put the height of graphic "shoppingPhoto" of cd "content" into theHeight
put the width of graphic "shoppingPhoto" of cd "content" into theWidth
mobilePickPhoto photoSource, theHeight, theWhidt -- photoSource is camera or library
if the result is empty then -- no errors
set the name of the last image to "myImageTempName"
set icon of button "imageButton" to "myImageTempName"
end if
end pickPhoto