background owners (and Re: unplaced grp)

Wilhelm Sanke sanke at hrz.uni-kassel.de
Tue May 20 17:47:02 EDT 2003


Especially to
Dar Cott, Miscdas, and Dave Cragg

> Any other suggestions what to try else to find directly unplaced
> backgrounds?--

Thanks very much for your recommendations and additional information.
Any "wild" ideas, tested or not, are welcome.

The problem I had was an added "groups" card for an application browser
(with functions similar to the old Application Overview) where I needed
an instant "refresh" of information about backgrounds when topstacks are
changed and where the information about "unplaced" backgrounds was
essential.

So, iterating or going through the cards as in my workaround  would have
been too slow for a refresh routine with large stacks.

I tested your suggestions.

The "if not exists(group Id L)" routine somehow did not yet work here,
but I will try variations of the syntax.

Indeed, Dave´s "number of cards" suggestion did the trick immediately.


> 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
>    end if
> end repeat
> ## do something with tList
>
The script, though, has to be amended for backgrounds that do not have a
name, but only IDs, so I finally came up with slightly altered script -
as one of possible modifications -

" repeat for each line tBG in the backgroundIDs of this stack
        if the number of cards of background ID tBG = 0 then
      put tBG & return after tList
    end if
  end repeat
  put tlist into fld "unplaced""

Information about this "number of cards"-test routine should be added to
the help files (at least I could not find it there so far).

Thanks again very much for your  responses!

Wilhelm Sanke





More information about the use-livecode mailing list