Pasted card with a background not included in the number of cds of this bg
Andre.Bisseret at inria.fr
Fri Jun 25 03:46:21 EDT 2010
Thanks a lot Jacque and Jim; far much clearer for me now ;-))
So, as I need to get the number of cards of a given background "Bg1"
each time I create a new card from one which has this background on
it, I replaced copy/paste card (that I was trying before) with clone
Indeed, with copy/paste the number of cards in background Bg1 does not
increase by 1, while with clone this card it does.
Best regards from Grenoble
Le 24 juin 10 à 17:40, Jim Ault a écrit :
> On Jun 24, 2010, at 7:33 AM, J. Landman Gay wrote:
>> Andre.Bisseret wrote:
>>> So, if one copy/paste a card including a group whose
>>> backgroundBehavior is set to true, the new card is not a part of
>>> the cards of the background despite the fact that this background
>>> is actually on the card.
>>> More, if one clone such a card (resulting of copy/paste) then the
>>> new card is not a part of the cards of the background!!
>> Yes, because when you copy/paste or clone, you are making a copy of
>> the entire card including the background group. The new group looks
>> identical but is really independent. It is the same as copy/pasting
>> any other control, you get a new one.
>> Jacqueline Landman Gay
> The way to see this is to check the ID of the backgrounds.
I was missing that; OK, with copy/past card the name of the background
remains but the ID changes
> To include the cards as having the same bg ID, use the Place command.
it works with clone card too
> It is also useful to rename backgrounds so that you don't get
> confused about which one is which.
In my case, I need to keep the same name
> Also note: you can have multiple backgrounds on a single card, each
> having its own ID.
> In the stack script you could do this discovery technique:
> on opencard
> put the backgroundIDs of this stack & "=stk" into message box
> put cr & the backgroundIDs of this card & "=cd" after message box
> put cr & the number of groups of this card & "=gr" after message box
> pass opencard -- in case another handler is waiting for this
> end opencard
Ok, I tried that, very usefull to better understand (I added "put cr &
the number of cds in bg "bg1"
> Also note that 'group' and 'background' are synonymous if the
> background behavior of a group it true.
> You can use the Place and Remove as often as you like, since the
> (backgrounds and groups) belong to the stack, not the card.
> Hope this helps,
> Jim Ault
> Las Vegas
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode