import image in standalone

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
robm80
Posts: 161
Joined: Sat May 03, 2014 7:15 am

import image in standalone

Post by robm80 »

Is it possible to import an image in a standalone stack.
If yes what script?

thanks, Rob
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: import image in standalone

Post by keram »

To import an image to a LC stack is possible, but if you mean standalone app then I'm almost sure that you can't.
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: import image in standalone

Post by Klaus »

Hi Rob,

of course you can import an image into a standalone:
...
import paint from file "path/to/file.jpg"
...
which will, of course, NOT get saved, because it is a standalone 8)

You will need to save it before closing your app and "import" it again,
when the app starts the next time.


Best

Klaus
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: import image in standalone

Post by keram »

Hi Klaus,

Good that you clarified it, at least to some extend.
But...
Klaus wrote:of course you can import an image into a standalone:
How do I open that standalone (for example apk file)?
Klaus wrote:import paint from file "path/to/file.jpg"
and where to put this line?
Klaus wrote:You will need to save it before closing your app and "import" it again,
when the app starts the next time.
This also not clear for me since my app do not have any Save nor Import functions...

Can you please clarify?
Thanks.

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: import image in standalone

Post by Klaus »

Hi Keram,
keram wrote:
Klaus wrote:of course you can import an image into a standalone:
How do I open that standalone (for example apk file)?
I thought we were talking about importing an image at runtime, means the app is open and running!?
keram wrote:
Klaus wrote:import paint from file "path/to/file.jpg"
and where to put this line?
Wherever you want to import an image! 8)
keram wrote:
Klaus wrote:You will need to save it before closing your app and "import" it again,
when the app starts the next time.
This also not clear for me since my app do not have any Save nor Import functions...
Yes, that's what I said :D

Just like storing "preferences" in a separate file in the users "prefs" or "documents" folder.
In the end it depends where and how you need to import an image.


Best

Klaus
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: import image in standalone

Post by Simon »

Hi Keram,
Check out this little stack
http://forums.livecode.com/viewtopic.ph ... 68#p103136
Just add some photos and text and then look in Documents/myPlants/Preferences.txt
Read that file and you'll see how it works.
Add breakpoints and step through the code.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: import image in standalone

Post by keram »

Thanks Simon,
It's a really good example.
keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit
Post Reply