Saving and loading data from a standalone app?

Jamie Meta at Dimensional.com
Fri Dec 14 18:09:00 EST 2001


This is probably a simple thing. I created a stack that acts as a
database. Each card is a record. In the development environment I
can enter data and save the stack reliably.

Next I need to build it as a stand alone application that loads and
saves its database. It only needs to work with a single set of data.
My first attempts at this have not been successful. 

Can anyone describe how to set up saving and loading a simple
database file from a standalone app?

I've looked for clues in the transcript dictionary, the example
project and this list. For testing I've added a save button with
this script:

on mouseUp
  set itemDel to "/"
  set the directory to item 1 to -2 of the fileName of this stack
  save this stack as "test.edb"
end mouseUp

I also have an Open button with this script:

on mouseUp
  set itemDel to "/"
  set the directory to item 1 to -2 of the fileName of this stack
  toplevel "test.edb"
end mouseUp

These seem to work in the development environment but not when built
as a stand-alone. I probably need a better understanding of substack
usage (among other things), but any tips, clues would be most
welcome - especially transcript examples and step-by-step
descriptions of how to save/load stack data from a stand alone Rev
app.

Thanks,
 -Jamie

(Currently running Rev 1.0 Starter Kit on NT.)



More information about the use-livecode mailing list