Deleting a line in a scrolling list field

Eric Chatonet eric.chatonet at sosmartsoftware.com
Tue Nov 21 03:26:59 EST 2006


Hi Scott,

You can use a simple "delete line x of field y" but...
When you say you could probably load the list into into a variable  
and then parse it back to the list field, you are completely right.
This way of doing is much faster.
Always prefer to parse a variable than acting directly on any  
displayed contents.
Why?
Because when working with a variable you only work in REV memory and  
call the system only once to update the display when finished.

For instance:
When deleting line x in a list field 1000 times:

42 seconds using delete line x of fld y without lock screen
26 seconds using delete line x of fld y with lock screen
200 milliseconds putting the list into into a variable and then parse  
it back to the list field

;-)

Le 21 nov. 06 à 08:59, Scott Kane a écrit :

> Must be the day for me to find things I've not learned to do yet. <g>
>
> Have checked help docs etc and not found a good solution to this.   
> How does one delete an arbitrary line in a scrolling list field and  
> not just be left with an empty line?   I figure I could probably  
> load the list into into a variable and then parse it back to the  
> list field, but I'm curious as to whether or not there is an easier  
> way....


Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list