[comp.sys.mac.hypercard] Background weirdness! Please help!

bjornl@milton.acs.washington.edu (Bjorn Levidow) (04/13/90)

Hi all,
	for the past couple of months, I've been developing a stack to 
assist teachers in diagnosing misconceptions that high school students
have about physics.  When entering a new question, my script creates a new
card by copying a "master" template card which I have set up and then pasting
it with a new name "temp".
	But the problem is that sometimes when I paste the "temp" card,
it has a new background ID and the new card is the only card associated
with that background!!!  Having a million backgrounds expands the stack
size alot when your background script is about 20K :-).  Any ideas on
what the problem is or how to fix it?  Any and all help would be appreciated!!

Thanks in advance.

===============================================================================
\  Bjorn Levidow                    |  "I'm in pain!  And I'm wet and I'm     /
\  Dept. of Psychology              |    STILL hysterical!" - Mel Brooks      /
\  University of Washington         |                                         /
\  Seattle, WA  98195               |   It's mine!  All mine!                 /
\  bjornl@u.washington.edu          |   I'm independently thoughtful!         /
===============================================================================
 

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (04/13/90)

In article <2840@milton.acs.washington.edu> bjornl@milton.u.washington.edu
(Bjorn Levidow) writes:
>	But the problem is that sometimes when I paste the "temp" card,
>it has a new background ID and the new card is the only card associated
>with that background!!

I can't tell exactly what's happening to cause new backgrounds without
looking at your stack. However, knowing this may help: *any* difference
between the background objects in the pasted card and the background objects
of the background in the stack will cause HyperCard to create a new
background. This includes properties such as the hilite of a button. One
common cause of the problem is a checkbox or radio button whose hilite
state is changed between the time the card is cut or copied and the time
it's pasted back in: this counts as a change in the background, and since
the pasted card's background structure is now different (no matter how
little) from that in the stack, HyperCard assumes that it should paste the
card with a unique background.
-- 
====== jeanne a. e. devoto ========================================
 jdevoto@apple.com  |  You may not distribute this article under a
 jdevoto@well.UUCP  |  compilation copyright without my permission.
___________________________________________________________________
 Apple Computer and I are not authorized  |        CI$: 72411,165
 to speak for each other.                 |  AppleLink: SQA.TEST