Arghhh. Is this stack corrupt?

Gerry gerry.orkin at gmail.com
Tue Mar 29 09:48:29 EDT 2011


I'm wanting to save the current card name out to a text file when my iOS app quits, so I can return there when the app re-opens.

I use:

on shutdown
 set the defaultFolder to specialFolderPath("Documents")
 put the short name of this card into URL ("file:shutdown.txt") 
end shutdown

That writes out e.g. "Songs" to the shutdown.txt file ("Songs" is one of the card names).

On openstack, I want to go to the card whose name is in that file. So I do:

on openstack
set the defaultFolder to specialFolderPath("Documents")
go card URL ("file:shutdown.txt") 
end openstack 

All works fine on my Mac, and on that platform I can see the correct value is being written out to the file, and being read in from the file on openstack.

Until this afternoon, it was working in iOS - now it's stopped. No matter what is being written out on shutdown in iOS, if I check the text read from the file on openstack (using answer URL ("file:shutdown.txt")) I always get the value "card id 1002".

I have no card id 1002 in my stack! 

What is going on?

Cheers

Gerry







More information about the use-livecode mailing list