Saving data to a datastack
Posted: Mon Jun 28, 2010 2:14 am
I have now got my application working fine when it's in development mode. I have a completely separate stack that opens with the Main stack that I am using as a database stack. When I close the main stack the contents of two fields on separate cards are meant to be saved into two fields on separate cards in the data stack. On opening the main stack it all works the other way around. Everything works fine in development mode but when I set up a stand alone application the save script doesn't work but strangely enough the the upload script does. I have attached the code which is saved to Card one of the main stack - someones recommendation to stop it working when I opened substacks.
Any assistance greatfully accepted.
Code: Select all
on openstack
lock screen
put filename of this stack into f
set itemdel to "/"
put "aperiodata.rev" into last item of f
open stack f
hide stack f -- keeps the stack open but hidden
put fld "ProductSpecs" of card "productSpecs" of stack "Aperiodata" into fld "productSpecs" of card "Product Specification" of stack "FFF - Aperio Version3"
put fld "blends" of card "blends" of stack "Aperiodata" into fld "specdata" of card "Compound Specification" of stack "FFF - Aperio Version3"
unlock screen
end openstack
on closestack
put fld "productSpecs" of card "Product Specification" into fld "ProductSpecs" of card "productSpecs" of stack "Aperiodata"
put fld "specdata" of card "Compound Specification" into fld "blends" of card "blends" of stack "Aperiodata"
save stack "Aperiodata"
close stack "Aperiodata"
end closestack