Controls in a stack

Monte Goulding monte at sweattechnologies.com
Mon Jan 21 14:48:20 EST 2013


Hmm... have you checked to see if your original handler doesn't parse controls in shared groups more than once?

I tend to use a recursive function for this kind of thing.

On 22/01/2013, at 6:29 AM, Peter Haworth <pete at lcsql.com> wrote:

> I have a handler that I think uses a pretty standard way of getting a list
> of all the controls in a stack with nested repeat loops on the
> stack/substacks, then the cardIDs in each stack, then the controls in each
> card.
> 
> It works fine but trying to see if there's a more efficient way to do it
> and noticed that I can eliminate the loop on the cards within a stack with
> "repeat with x=1 to the number of controls in stack tStack".  However, when
> doing this, I get a count of controls that is around 1000 less than doing
> it the original way, on a total count of a little over 16,000 controls.
> 
> 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.
> 
> It turns out that the time it takes to get the controls this way is no
> better than repeating through the cards so I won't be changing my handler,
> but I'm wondering if there's a logical reason for controls being missed
> like this.
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Monte Goulding

M E R Goulding - software development services
mergExt - There's an external for that!








More information about the use-livecode mailing list