[comp.sys.mac.hypercard] Stack losing knowledge of bg scripts: HELP!

gft_robert@gsbacd.uchicago.edu (opcode ranger) (05/28/91)

I'm having a big problem with a stack I'm writing.  The situation is this: I
have functions in one of my backgrounds, which in turn call functions in the
stack script, which in turn call functions in the background script (first
making sure that the current card is in the correct background).  _However_,
when I edit the bg script from a certain card in this background (let's call it
card "A") and then try to test the script, the stack script has no knowledge of
the bg handlers.  However, on debugging, I can see that the correct bg is
current, AND it works from all other cards in the bg, just not that one!

That is, if I have the following handlers/functions in my bg script

on DoSomething
	put DoStackScriptFunc() into xxzzy
end DoSomething

function ReturnSomeBgThing 
	return athing
end ReturnSomeBgThing

and if I have the following in my stack script

function DoStackScriptFunc
	if this bg = correct bg then
		return ReturnSomeBgThing()
	else
	return errorVal
end DoStackScriptFunc


If I call this from card A, then I get a debug break in DoStackScriptFunc()
saying "Don't understand 'ReturnSomeBgThing'", even if I'm in the right bg. 
Again, other cards can access the bg scripts, AND if I quit HC all the cards
(including A) work normally.  This has happened several times on different card
A's (that is, it's not always the same card).  Obviously something's getting
hosed.  Any clues?  I just had some RAM and VRAM installed yesterday, but I
can't see how that would do it, since the RAM passes all boot tests fine.  TMON
Pro says the heap is OK, too.

I'm stumped.  Any HyperCard wizards out there with any ideas?

Robert
-- 
============================================================================
= gft_robert@gsbacd.uchicago.edu * generic disclaimer: * "Good tea.        =
=            		         * all my opinions are *  Nice house."     =
=                                * mine                *  -Worf            =
============================================================================