Copy card question from 1 stack file to another
Robert Brenstein
rjb at robelko.com
Sun Jun 19 19:55:34 EDT 2005
>Hi everyone,
>
>This has to be simple, but it has me stumped.
>
>I am running rev 2.51 on WinXP
>
>I am copying 20 cards from one stack file to a separate stack in another
>file. The cards have two objects I am interested in, an option menu button
>and a scrolling field. Selecting the option menu switches cards and displays
>the text of the field on that card. This all works fine in the original
>stack.
>
>In the original stack, the option menu has the same ID across all cards.
>(1784). The field also has the same ID across all cards.(1785). And the two
>objects are grouped and set as background. The option menu button is set to
>Display name.
>
>After I copy the 20 cards to anther stack in a separate file, everything
>looks the same (grouping, settings, etc.), however each option menu and
>field has a unique ID in each card. So, when I select an option from the
>option menu, it goes to the right card and displays the proper text in the
>field, BUT, the display name of the option menu button is "floating" and
>random from card to card.
>
>How do I copy the cards so that they are identical and work the same in both
>stack files?
>
>Jim
>
You should copy first and once only the background groups with your
option menu and the shared field. Make sure that they have still bg
property set.
When copying, you should exclude those groups and copy only objects
that are unique on each card.
Each time your script creates a new card in the destination stack,
the background groups will be automatically placed on it, which is
what you want.
Now, it sounds also to me that you want to copy content of that
shared field and it is different on each card. To copy it, you don't
copy the field. Instead, simply copy its content from fld to another
while walking the cards.
Robert
More information about the use-livecode
mailing list