TemplateImage Confusion

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

TemplateImage Confusion

Post by KennyR » Mon Apr 01, 2013 6:03 pm

I have been trying to create a template image object and import a image from the IOS "documents" space but having some issues. I can get this to work when I use the "mobilePickPhoto" command, but not when I am trying to import an image saved to documents. any help would be appreciated....here is my code and what I am trying to do...thanks

Code: Select all

 set the lockloc of the templateimage to true
    set the width of the templateimage to "82"
   set the height of the templateimage to "80"
   set the left of the templateimage to "9"
    set the top of the templateimage to "54"
set the defaultFolder to specialFolderPath("documents")
set the fileName of the templateImage to URL("file:contact1.png") 

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: TemplateImage Confusion

Post by jmburnod » Mon Apr 01, 2013 6:19 pm

Hi KennyR,
Sorry.Not explanation I have to eat but
try

Code: Select all

new image
put specialFolderPath("documents") into tPathDoc
put  tPathDoc & "/" & "contact1.png" into tpathIMg
set the fileName of last image to tpathIMg
instead

Code: Select all

set the fileName of the templateImage to URL("file:contact1.png")
Best regards
Jean-Marc
https://alternatic.ch

KennyR
Posts: 256
Joined: Thu Jan 19, 2012 4:25 am

Re: TemplateImage Confusion

Post by KennyR » Mon Apr 01, 2013 9:19 pm

NICCEEEE! Thanks very much.....works like expected!

Post Reply