save data on cards in standalone app

Richard Gaskin ambassador at fourthworld.com
Sat Feb 19 12:32:05 EST 2011


John Allijn wrote:
> I created a stack, just the way I used to do it in hypercard. Basic cards with a next and a prev button and a few text-fields to enter text into.
> All looks nice and I can tunr it into a mac/win application. Entering text in the standalone also works great, but when I exit the application and open it again, all fields are empty.
>
> I guess I'm forgetting something (?) can anyone tell me how to save the data I entered on the card? (tried to search on the forum, but that is down because of maintanance...)

This is an OS issue, in which pretty much all OSes prevent an executable 
from modifying itself.

HyperCard was able to work around that because of the dual-fork nature 
of Mac Classic, in which the executable code was stored in the resource 
fork while the data fork remained modifiable.

Under the Mach system OS X uses, the Mac is now more like other OSes in 
that regard, with executable code now residing in the data fork (I 
believe the resource fork has been slated for deprecation somewhere down 
the road IIRC).

That said, it's still easier to work with this in LiveCode than it is in 
nearly any other RAD tool - Sarah Reichelt has you covered here:

<http://livecodejournal.com/tutorials/saving_data_in_revolution.html>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv




More information about the use-livecode mailing list