Setting hidden of lines very slow

Andre Alves Garzia andre at andregarzia.com
Fri Nov 30 08:41:29 EST 2018


Kaveh,

I would work which lines should be shown and hidden inside a variable 
and then replace the whole field...

On 30/11/2018 13:07, Kaveh Bazargan wrote:
> Yes Andre, that is the line that fixed it, in a split second :-)
>
> But here is a follow-up: Now I want to hide all lines that have no 
> text style and only show lines with colored text. I use:
>
> repeat with i = 1 to the number of lines of fld 1
>       if the textcolor of line i of fld "text" is not empty then
>          set the hidden of line i of fld "text" to false
>       end if
>    end repeat
>
> This is taking time too. Any suggestions how to speed this up?
>
> On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
> <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>> 
> wrote:
>
>     There is another tip here in this thread about
>
>     set the hidden of line 1 to -1 of field "the field" to false
>
>     As a single command, it might be better.
>
>     On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
>     > Thank you guys. I am always embarrassed to ask here as I know
>     the answer is
>     > a one liner!!
>     >
>     > And Andre the screen was locked already. :-)
>     >
>     > On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
>     > use-livecode at lists.runrev.com
>     <mailto:use-livecode at lists.runrev.com>> wrote:
>     >
>     >> Hi Andre,
>     >>
>     >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>     use-livecode <
>     >> use-livecode at lists.runrev.com
>     <mailto:use-livecode at lists.runrev.com>>:
>     >>> tied locking the screen first?
>     >> tied AND locked?
>     >> Andre, you are hardcore! :-D
>     >>
>     >>> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
>     >>>> I have a text field with some 3500 lines of text. I want to
>     ensure all
>     >>>> lines are visible, as I have hidden some before. I use:
>     >>>>
>     >>>> repeat with i = 1 the number of lines of fld 1
>     >>>>        set the hidden of line i of fld 1 to false
>     >>>> end repeat
>     >>>>
>     >>>> This is taking over 1 minute to complete. I have tried
>     removing all
>     >> styling
>     >>>> from the text so e.g. backgroundcolor is empty, etc. Same result.
>     >>>>
>     >>>> Any suggestions pls?
>     >> Best
>     >>
>     >> Klaus
>     >>
>     >> --
>     >> Klaus Major
>     >> http://www.major-k.de
>     >> klaus at major-k.de <mailto:klaus at major-k.de>
>     >>
>     >>
>     >> _______________________________________________
>     >> use-livecode mailing list
>     >> use-livecode at lists.runrev.com
>     <mailto: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
>     >>
>     >
>
>     _______________________________________________
>     use-livecode mailing list
>     use-livecode at lists.runrev.com <mailto: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
>
>
>
> -- 
> Kaveh Bazargan
> Director
> River Valley Technologies <http://rivervalleytechnologies.com/> • 
> Twitter <https://twitter.com/kaveh1000> • LinkedIn 
> <https://www.linkedin.com/in/bazargankaveh/>



More information about the use-livecode mailing list