On Dec 11, 2003, at 9:44 AM, [EMAIL PROTECTED] wrote:
Sarah wrote:
I am still running numerous HyperCard based systems and I do get corruption, of two sorts. One is the 5454 error, so I would be very interested to hear your method for avoiding this. The other is when a single card seems to disappear and any reference to it just produces a "No such card." error. Do you have a recipe for avoiding this type as well?
I do the following several times a day. Go to every card in the stack, do a compact stack, then trigger an AppleScript to copy the compacted stack to another folder so if anything gets hosed, I'm out 2 hours of changed data at most.
You could do something like:
on opencard
global thenexttime
if the seconds > thenexttime then
put the id of this card into startcard
go next card
repeat until the id of this card = startcard
go next card
end repeat
domenu "compact stack"
put the seconds + (60 * 60 * 2) into thenexttime
push card
go to card "do backup"
send doit to cd btn "do the backup"
pop card
end if
pass opencard
end ifThe other thing to note is that you can open a dead 5454 stack with a text editor (I use TexEdit) and if you know it contains changes that you want to capture, chances are good you'll be able to search for the data and copy it out as text.
cool info:
What they were doing was a job costing on a 3,000 item/card inventory stack.
We stepped through the script and the stack corrupted predictably on card 357.
The code said:
repeat with i = 1 to the number of lines of fld x
do something
end repeat
Card 357 was unique in that fld x was empty. So we tested repeats and empty
fields. Sure enough, a repeat loop on a null set corrupts the stack with a 5454
error.
Then we went through every line of code in our system looking for repeat
loops on both fields and variables. We added a little test:
if fld x is not empty
then
repeat with i = 1 to the number of lines of fld x
do something
end repeat
end if
We added this code throughout the system about three years ago. Since then we
have only had one 5454 reported on the new code. Users who have continued
working with the old code still get 5455 errors at the same rate (another reason
for them to upgrade).
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
