Why doesn't this work now? (Copy & paste of a card with a background)
Arthur Rann
arthur.rann at gmail.com
Sun Feb 8 02:57:18 EST 2009
Hi,
I have a really strange and frightening situation on my hands that I'm
trying to make sense of. If anyone has a suggestion, I'd LOVE to hear it.
A few months ago, our users started complaining that things 'suddenly
broke'. This is happening in a standalone app based in RunRev 2.7 or 2.8,
whatever it was last summer, and is affecting both Mac and PC platforms.
We have a very simple system, with three cards being templates, and one card
being our 'intro' screen. We also have one group with its 'background' flag
on, which is a floating 'table of contents' (which we call TOC) that resides
on every screen. This group contains a list of all of the active files. When
a user chooses to create a new file, we execute the script below, which in
turn copies and pastes one of the three template cards. This TOC group then
gets updated with the latest name of the card, as per the script. This
worked fine until recently.
The problem is, the latest version of this stack no longer pastes the TOC
group as the same TOC group it starts off as. So subsequent clicks of the
'add file' button on the TOC ends up creating another copy of itself, and
the data being written to its field is then unique to that card, instead of
listing all of the cards. Does that make sense, and does anyone know why
this might SUDDENLY start happening?
I know the original version was written in a trial version of 2.7, I think,
but the final version was published using the fully licensed version. Could
that be the problem?
I have two stacks that are represent the start and end of about 6 months of
development time. If I execute this script in the original stack (in RR 3.0,
it works correctly. If I do this in the more recently altered stack (also in
RR 3.0), it fails.
I know that the ID for a copied group needs to be the same as the one on the
previous card, in order for it to behave as a background, or at least that's
what the RR help files say. But in this case, it should be. It's that
pasting the card containing the TOC seems to be altering the TOC ID now, and
it doesn't do that on the original.
What should I look for? Any suggestions?
Here's the script...
*on* mouseUp
createNewPlay
*end* mouseUp
*on* createNewPlay
*ask* "What would you like to name the new file?"
*if* it is empty *then* *exit* createNewPlay
*put* it into newName
*lock* screen
*copy* card 1
*go* last cd
*paste*
*set* the cantdelete of last cd to false
*put* the number of lines of bg fld "CardList" into thisMany
*put* "Play: " & newName into line thisMany + 1 of bg fld "CardList"
*unlock* screen
slowmohideTOC
*end* createNewPlay
Thank you,
-Art
More information about the use-livecode
mailing list