Page 1 of 1

Embedding images in fields - ideal design ?

Posted: Sat Oct 12, 2013 9:55 pm
by Simon Knight
I wish to build an application that allows the user to add images to text notes in a notebook like app. I have been searching the web and reading the documentation and believe that I have a basic understanding of how to get images into and out of a Livecode application but I am not sure of the best approach for storing the images.

At present I plan that the text of the notes will be stored in a delimited text file which gets updated as the application is run. The app will allow images to be drag dropped into the application, then they will copied out to a dedicated folder used to store the applications assets. Once they have been written out the text of the note will be linked to the image file and the file name of the image and its character position in the field will be stored in the delimited text file.

Is my plan sound ?

Re: Embedding images in fields - ideal design ?

Posted: Sat Oct 12, 2013 10:01 pm
by Simon
Hi Simon,
Like using an external file that you update you can use a stack as well.
The cool thing about using a stack is that you can store binary files in it.

If I understood you correctly then you could/should be using the Splash Stack method.

Simon

Re: Embedding images in fields - ideal design ?

Posted: Sat Oct 12, 2013 10:13 pm
by Simon Knight
Hi Simon,

So I would have to use a splash stack so that I am able to save my main stack and sub stacks when running as a stand alone. Would it just be a case of importing each image onto a hidden substack?

Simon

Re: Embedding images in fields - ideal design ?

Posted: Sat Oct 12, 2013 10:22 pm
by Simon
Hi Simon,
Here is the splash stack lesson:
http://lessons.runrev.com/s/lessons/m/4 ... pplication

In short no, you don't use a hidden stack just a "normal" stack.
The big difference is your "real" application is never built into a standalone and can remain a .livecode/.rev/.whatever_you_want, you may know a standalone can't save new info in them but a stack can.
Only the stack that launches your main stack is a .exe or .app.

Simon