background owners (and Re: unplaced grp)
dcragg at lacscentre.co.uk
Tue May 20 15:50:02 CDT 2003
>> Is there a quick way to know which of a stack`s backgrounds (groups with
>> background behavior set to true) are on no card?
>> The problem is that for backgrounds on *unvisited* cards the owners are
>> returned as "stack" even when the real owner is the card.
>> A workaround is to first go to all cards of a stack - and only after
>> that ask for the owners of backgrounds - but this takes extra seconds
>> for large stacks on slower computers
>> Is there a direct way to determine which backgrounds are on no card at
>In the meantime I have tried the "long name" and the "long ID"
>properties to directly identify "unplaced" backgrounds. The results are
>the same as with the "owner" property:
>Both "unplaced" backgrounds -. that have only the stack as its owner -
>and backgrounds placed on cards you did not go to before - return the
>"stack" as owner or the next object up in the hierarchy.
>So the above described workaround is necessary here, too, to find the
>real "unplaced" backgrounds.
>Any other suggestions what to try else to find directly unplaced
You can get a list of the backgrounds in the stack with the
backgroundnames property. Then loop through each line, checking for
"the number of cards of background <whatever> = 0"
repeat for each line tBG in the backgroundnames of this stack
if the number of cards of background tBG = 0 then
put tBG & return after tList
## do something with tList
More information about the use-livecode