Saving to a Stack
Greg Wills
gwills at ozemail.com.au
Sat Oct 18 08:48:12 EDT 2003
Welcome back everyone!
Could some kind sole please give me a hand with the process of saving
updated information into a field in a standalone substack. I have read
a number of items on the subject, but I am the type of leaner that has
to do it by example and then I get it. (I haven't got it yet.)
I have put together a very simple stack to run my test. Could someone
please give me some guidance to his wayward son!!
Here is what I have - that does not work.
Main stack - "InfoStack" with a field where data is entered -
"Masterfield"
Substack - "DataCollector" with a field to hold updated data - "Holder"
In the mainstack script I have;
on preOpenStack
set the stackFiles of this stack to "DataCollector" -- is this
correct?
end preOpenStack
On a Mainstack card with the field "Masterfield" I have a button with
the script; -- to put added data into the "Holder" field in the sub
stack "DataCollector".
on mouseUp
put field "Masterfield" into field "Holder" of stack "DataCollector"
save stack "DataCollector"
end mouseUp
On the same card there is another button to update this field
"Masterfield" from the saved state of the substack.
on mouseUp
put field "Holder" of stack "DataCollector" into field "Masterfield"
of this card
end mouseUp
This works fine in Rev but not as a standalone.
When I build a Distribution I have checked "Automaticaly set stackfiles
on mainstack", "Move substacks into individual files" and "Create
folder for sub stacks" (data). I imagined that the substack,
"DataCollector" would be put into the "data" folder in this build - but
it doesn't. Is this right?
(Using Rev 2.0.2, Mac OSX)
I am missing something I know, but don't now what.
Thanks in advance.
Greg
More information about the use-livecode
mailing list