On Tue, Jan 22, 2013 at 3:29 AM, Peter Haworth <[email protected]> wrote: > Looking at the controls that are missed, they are almost all from stacks > that contain multiple cards, seemingly randomly missing a few from each > card. There are also a handful that have an id of zero which I didn't > think was possible but that's another topic.
Quick test: 1) New Main Stack 2) Add a button, 3) Add a new card 4) Add a button 5) Go back to cd 1 and group the single btn and turn it into a background 6) Add a Card (this should come with the bkgnd btn) 7) Add to this a normal btn. So you should have a 3 card stack with 1 card that has a bkgnd btn on it, a 2nd card with a bkgnd btn + a normal btn, and a 3rd card with just a normal btn. Total number of controls for the stack is 4 (a group for the bkgnd, a btn in the bkgnd group, and two normal btns. In the msg box if I enter: put the number of controls of stack "test" the answer I get back is always the number of controls of the current front most card of the stack, I can not get 4 as the answer. So if I happen to be on the card with only the normal btn, then the answer is 1, the answer you want is 4, and if I loop through the cards the answer I get is 6. As you've already figured, the problem is associated with multi-card stacks, from what I can tell 'the number of controls of this stack' will never give the correct answer for a multi-card stack, and if you loop through all the cards you'll end up duplicating the process for any background controls. HTH _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
