Sequential Layout of Script-created Objects

Bernard Devlin revolution at knowledgeworks.plus.com
Wed Dec 11 07:32:00 EST 2002


Dar,

I am the original poster, and I am using something like you mention.

> Maybe the poster was thinking of something like this:
> 
> repeat while n < the number of controls of group "grpbuttons"
> 
> The "number of controls" function seems to be pretty fast, but there 
> might be others not fast and it would be faster to not repeatedly 
> count.  An example might be "number of lines" for lots of lines.

I don't envisage the users including more than a few hundred lines (which in
turn would require the deletion/creation of a few hundred controls).

I've just done a test with 1000 lines.  Refreshing the palette of buttons
(deleting then creating the same number of controls) with 1000 lines.  The whole
operation takes about 7 seconds.  This is far more entities than I envisage the
user's requiring, and as this is a maintainenance operation that I don't think
users will do more than once a day, I think the speed is probably acceptable.

However, I noticed that sorting the lines of text is itself very much faster,
so I may look at ways of bypassing the deletion/creation of all the buttons if
there is a speed issue.  It may be that it is better to re-layout the controls
rather than to re-create them.



More information about the Use-livecode mailing list