What am I missing here ...
Code: Select all
if the environment is "mobile" then
mobilepickPhoto "album"
if the result <> EMPTY then
answer "Error:" && the result
exit mouseup
end if
put the text of last image into tData
put base64encode(tData) into tBase
set the text of img "customPhoto" of grp "pickPhoto" to tData
set the defaultFolder to specialFolderPath("resources")
put last image into url ("binfile:" & "sample.jpg")
set the vis of grc "background" of grp "pickPhoto" to false
set the vis of fld "field" of grp "pickPhoto" to false
set the vis of img "customPhoto" of grp "pickPhoto" to true
delete last img
end if