Image missing ?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
michel_bujardet
Posts: 45
Joined: Mon Apr 21, 2014 10:41 am
Contact:

Image missing ?

Post by michel_bujardet » Wed Apr 23, 2014 1:08 pm

I am playing with a hello world project and added an image area.

The picture it contains shows in the editor, but does not show in the iPhone simulator, whether I use jpg or png.

What am I missing ?

Also, the virtual keyboard does not seem to want to go away, even when I click on the home button, or out of the keyboard area...

Any help will be appreciated. Thank you in advance.

PS : I wanted to post a screen grab, but the forum won't let me insert a picture :(

Mitch
http://FontMenu.com

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Image missing ?

Post by Dixie » Wed Apr 23, 2014 2:36 pm

If you import an image into your stack it becomes 'part' of your stack...

You added an image area and then chose a file to display within the image area... When you run your stack in the simulator it does not know where that image is. You must copy the image that you wish to use into the 'app'. Do this by adding your image to the stack you wish to run in the simulator through the copy files pane... 'file > standalone settings'..

Then when you open the card

Code: Select all

on preOpenCard
   set the filename of image 1 to specialfolderpath("engine") & "/world.jpg"
end preOpenCard
As for the kkeyboard hiding/showing.. set the focusable (traversalON) in the property inspector to 'off'.. In the script of the field place the following :-

Code: Select all

on mouseDown
   set the traversalOn of me to true
   focus on me
end mouseDown
The keyboard will appear when you 'click/touch' the field.

in the card script... place the following to take the focus away from the field and the keyboard will hide...

Code: Select all

on mouseDown
   set the traversalOn of fld 1 to false
end mouseDown
Attachments
Archive.zip
(194.25 KiB) Downloaded 212 times

michel_bujardet
Posts: 45
Joined: Mon Apr 21, 2014 10:41 am
Contact:

Re: Image missing ?

Post by michel_bujardet » Wed Apr 23, 2014 3:12 pm

Thank you so much Dixie :)

Mitch
http://FontMenu.com

Post Reply