Page 1 of 1

Saving data entered into a stack

Posted: Fri Mar 12, 2010 5:22 am
by Glenn Boyce
I've set up a really simple little stack with a table field that entered data is saved into. When I set the stack up as a stand alone application it doesn't save the changes i.e. the new data enetred into the field. I have put a closestack script as shown below. What have I done wrong?

Code: Select all

on closestack
  save this stack
end closestack

Re: Saving data entered into a stack

Posted: Fri Mar 12, 2010 11:23 am
by Dixie
Hi...

The main stack of your standalone cannot save changes to itself... but a substack can... So, how about using your main stack as a 'splash screen'.... which opens when you open your app... Have a button on the splash screen that opens a sub-stack and closes the 'splash screen'... You are now effectively using the sub-stack as the 'main' stack of your application..

In the stack script of your sub-stack, save the changes you have made, they will be there the next time you run your app.

Code: Select all

on closeStack
   save this stack
end closeStack
Be well

Dixie

Re: Saving data entered into a stack

Posted: Fri Mar 12, 2010 4:49 pm
by BvG
Note that "substack" is a specific term in runrev, and substsacks of the mainstack are in the same stackfile, therefore cannot be saved. What you mean is a seperate stack, that is not part of the application itself and gets loaded somewhen.


See also this post that explains stacks.

Re: Saving data entered into a stack

Posted: Fri Mar 12, 2010 4:56 pm
by Dixie
Bvg...

You are quite correct... I omitted to point this out.

regards,

Dixie