Where to put needed resources

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
uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Where to put needed resources

Post by uelandbob » Thu Jan 01, 2015 8:18 am

In many other programming environments (Xcode for instance) you add resources that your project will need like images, sounds and so on to your project. How do you do corresponding thing in LC? I was thinking of having a card called Resources, which user never sees, but where I could import my controls. Is that a good way to do it, or is there some better way?
uelandbob@gmail.com

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

Re: Where to put needed resources

Post by jmburnod » Thu Jan 01, 2015 12:39 pm

Depends the number of ressources and what you want about security for your app.

For an app with many texts, images and sounds (> 3000), I do this:
All images, texts and sounds are referenced to a file except img used as icon which are in a cd "cMyStoreBtnImages" of the main stack.

That is only a way. It is also possible to use the main stack an other stack or substack to store all ressources.
Best regards
Jean-Marc
https://alternatic.ch

uelandbob
Posts: 72
Joined: Mon Dec 29, 2014 3:28 pm

Re: Where to put needed resources

Post by uelandbob » Thu Jan 01, 2015 1:29 pm

Thanks Jean-Marc, very good advice. But could you explain what you mean by
All images, texts and sounds are referenced to a file
I do not understand what this means. What kind of file are you referring to? A single file or what?
uelandbob@gmail.com

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

Re: Where to put needed resources

Post by jmburnod » Thu Jan 01, 2015 1:37 pm

What kind of file are you referring to? A single file or what ?
Yes. Sorry
are referenced to a file
I mean "are referenced to files"

Single file for texts (.txt), images (.png) and sounds (.aif"), except images used as icon for btns
https://alternatic.ch

Post Reply