andy@gistdev.gist.com (Andy Warinner) (05/07/90)
I am getting an "unexpected error 54321" from a script. Here's
the situation:
In background B:
Background B contains a field called "miscStuff".
In background A:
The background field "linkList" contains a list of card id's in
background B:
<short id of card in bkgnd B>
<short id of card in bkgnd B>
<short id of card in bkgnd B>
.
.
.
The background script contains the following handler:
on deleteCard
if bkgnd field "linkList" is not empty then
put bkgnd field "linkList" into linkList
put the short id of this card into cardId
push card
lock screen
set lockMessages to true
repeat with lineNum = 1 to the number of lines in linkList
go to card id (line lineNum of linkList)
-- sanity check: see if the card really exists
if cardId <> the short id of this card then
put empty into bkgnd field "miscStuff"
doMenu "Delete Card"
end if
end repeat
pop card
set lockMessages to false
unlock screen
end if
end deleteCard
When I delete a card in background A, the deleteCard handler runs and
finishes without an error. The next action that is taken (clicking,
selecting a menu, etc...) provokes the mysterious "unexpected error 54321".
Replacing 'doMenu "Delete Card"' with 'send "doMenu Delete Card" to
HyperCard' causes the same error. Replacing the push/pop card with
'go to card id cardId' causes the same error. Removing the lockMessages
has no effect.
Is there anyone out there in netland who knows what is causing this
"unexpected error". Hints, clues, or work-arounds would be greatly
appreciated.
Andrew Warinner |"The Berlin Wall is down. That means Germans are free to go
GIST, Inc. | wherever they want. Hey, wasn't that the problem in 1939?"
Standard | EMAIL: andy@gistdev.gist.com
disclaimer... | {uunet, uiucuxc}!gistdev!andyMIKE.ATANASIO@f53.n114.z1.fidonet.org (MIKE ATANASIO) (05/09/90)
reference error on deleting cards (by card id) can you use a short name of
the card to delete it instead of the id.. it seems to me that HC is
tempermental when referring to things by its id number.. mike
--
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!53!MIKE.ATANASIO
Internet: MIKE.ATANASIO@f53.n114.z1.fidonet.organdy@gistdev.gist.com (Andy Warinner) (05/09/90)
Please don't tell me I've stumped the net! I don't want to resort
to disgusting kludges to get this puppy to work. Any hints or help
would be MOST appreciated! BTW, there are no other deleteCard handlers
in the stack. In fact, there are no other scripts in the stack.
Andrew Warinner | "Semper ubi sub ubi" - J. Caesar
GIST, Inc. |
Standard | EMAIL: andy@gistdev.gist.com
disclaimer... | {uunet, uiucuxc}!gistdev!andy