Surely a minor issue I ran into while trying to add a special
"analyze-backgrounds card" for my "MetaBrowser" (a tool building on the
"control browser" including a search-and-edit-scripts feature and some
other functions):

There are 5 backgrounds in a stack with the following structure (the
backgrounds are renamed to better illustrate the issue)

group "one"
group "two"
  group "two-sub"
    group "two-sub-sub"
group "three"

i.e. there are three main backgrounds one of which contains two nested
backgrounds.

1. "put the backgroundnames of this stack" displays the three *main*
backgrounds

  one
  two
  three

2. but, first counting the number of backgrounds and then getting the
background names in a repeat loop with

    "on mouseUp
        put empty into BList
        put the number of backgrounds of this stack into BNumber
        repeat with i = 1 to BNumber
          put the name of background i of this stack into line i of
BList
       end repeat
       put BList
   end mouseUp"

yields

 group "one
 group "two"
 group "two-sub"

showing that "the number of backgrounds" determines the number of main
backgrounds, but listing them consecutively according to this number
displays the first three backgrounds irrespective whether they are main
or nested backgrounds.

Is this a bug or some kind of inconsistency? It would be helpful if such
a difference would in any case be documented.

3. Is there a simple way to list *all" backgrounds - main and
sub-backgrounds - like with the "backgroundnames" properties for the
main backgrounds, or to determine the total number?

Capitalizing on the fact that listing backgrounds consecutively displays
all backgrounds - main and sub - according to their order (compare 2.)
at least a script like

"on mouseUp
  put empty into BList
  put 0 into counter
  repeat until BName is empty
    add 1 to counter
    if there is a background counter of this stack then
      put the name of background counter of this stack into BName
      put BName into line counter of BList
    else
      exit repeat
    end if
  end repeat
  put BList
end mouseUp"

indeed displays all backgrounds:

group "one"
group "two"
group "two-sub"
group "two-sub-sub"
group "three",

but this is a rather circumstantial way to achieve this.

Regards,

Wilhelm Sanke



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to