Controls in a stack

Peter Haworth pete at lcsql.com
Mon Jan 21 15:05:23 EST 2013


Hi Monte,
Certainly in my original handler, there's nothing to prevent controls in
shared groups being counted twice so I should fix that.

But I don't think there are any shared groups in the stack I used to test
this.  I got myself a list of all the controls from the original handler
that weren't discovered by the alternative handler and most of them that
aren't in groups of any sort.

Pete
lcSQL Software <http://www.lcsql.com>


On Mon, Jan 21, 2013 at 11:48 AM, Monte Goulding <
monte at sweattechnologies.com> wrote:

> 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!
>
>
>
>
>
> _______________________________________________
> 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
>



More information about the Use-livecode mailing list