Re: Setting hidden of lines very slow

2018-12-09 Thread Kaveh Bazargan via use-livecode
Hi Jim

Normally I want the text to be editable most of the time, so it needs to be
in the field, but just hidden. But i can definitely see uses for your
suggestion of having different "views" instantly available.

Regards
Kaveh

On Sat, 8 Dec 2018 at 20:42, Jim Lambert via use-livecode <
use-livecode@lists.runrev.com> wrote:

> >  So I am looking to hide any line that contains no textcolor anywhere.
>
> You might save into a variable the HTMLTEXT of all the lines that contain
> the textcolor.
> Also save the HTMLTEXT of the whole field into another variable.
> Then in a blink of an eye you can instantly switch between the entire text
> and just the lines with colored characters - and back again.
>
> Jim Lambert
>
>
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-08 Thread Jim Lambert via use-livecode
>  So I am looking to hide any line that contains no textcolor anywhere.

You might save into a variable the HTMLTEXT of all the lines that contain the 
textcolor.
Also save the HTMLTEXT of the whole field into another variable.
Then in a blink of an eye you can instantly switch between the entire text and 
just the lines with colored characters - and back again.

Jim Lambert 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-03 Thread Alex Tweedly via use-livecode
On 03/12/2018 14:51, Håkan Liljegren via use-livecode 
 wrote:



and you can also shave off some milliseconds in the styledText version by using 
foreach:

…


It is a bit strange though that the foreach always seams to be faster. If we 
try to sum an array with 100 000 element like:




I know you were demonstrating the difference between "repeat for each 
key" and "repeat with i=", and using 'sum' to do so (very effectively).


But for completeness, just in case someone wanted to sum an array, I 
would point out that  you could also do



put the long seconds into tStart
put sum(tData) into tSum3
put the long seconds - tStart into tTime3

and that would another 4x faster again :-)
Alex



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-03 Thread hh via use-livecode
Sorry, the styledText method of my last post had a logic fault
(style-runs without textcolor are ignored).

The following works now for me.

-- styledText method
on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put the styledText of field "text" into tTextA
  repeat for each key aKey in tTextA
put tTextA[aKey]["runs"] into T
put true into isEmpty
repeat for each key I in T
  put isEmpty and (T[I]["style"]["textcolor"] is empty) into isEmpty
end repeat
put isEmpty into tTextA[aKey]["style"]["hidden"]
  end repeat
  set the styledText of fld "text" to tTextA
  put the millisecs - m1 into fld "timing"
end mouseUp

-- htmlText method
on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put ("color=" is in fld 1) into isInField
  if isInField then
replace "color=" with numTochar(1) in fld 1 preserving styles
  end if
  set linedel to "http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-03 Thread hh via use-livecode
> Hakan wrote:
> The code will not work if you have htmltext containing the text "color=" like:
> To set the color you can use color="#fa3b42"

Oh yes, was rather silly of me not to keep this in mind. There is a simple 
remedy:

put ("color=" is in fld 1) into isInField
if isInField then replace "color=" with numToChar(5) in fld 1 preserving styles
.. do the htmltext-method ..
if isInField replace numToChar(5) with "color=" in fld 1 preserving styles

what doesn't slow down if "color=" is in only a few lines.

> and you can also shave off some milliseconds in the styledText version by 
> using foreach:
> …
> repeat for each key aKey in tTextA
>   # Check if first run has textcolor set
>   put (tTextA[aKey]["runs"][1]["style"]["textcolor"] is empty) \
> into tTextA[aKey]["style"]["hidden"]
>  end repeat
> …
> For me that is always faster than your clever 'offset("color="…' version.

This may be true but the above doesn't work for the OP's question: To hide 
lines with
*any* textcolor property set, not only the textcolor for the whole line.

The styledText method is still very fast with the adjusted version below (make 
it better!).

For up to at about 2500 short lines the htmlText method is here still faster.
For more than 2500 short lines or if many text lines contain "color=" the 
styledText method
is faster.

The OP will simply take the version that is faster/better suited for his use 
case.

Here the two working methods that hide *exactly* the lines (more exactly: 
paragraphs)
of a field that contain no colored chunk.

-- styledText method
on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put the styledText of field "text" into st
  put st into tTextA
  repeat for each key aKey in tTextA
put tTextA[aKey]["runs"] into T
repeat for each key I in T
  put (T[I]["style"]["textcolor"] is empty) into 
tTextA[aKey]["style"]["hidden"]
end repeat
  end repeat
  set the styledText of fld "text" to tTextA
  put the millisecs - m1 into fld "timing"
end mouseUp

-- htmlText method
on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put ("color=" is in fld 1) into isInField
  if isInField then
replace "color=" with numTochar(1) in fld 1 preserving styles
  end if
  put the htmltext of fld 1 into ht
  set linedel to "http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-03 Thread Håkan Liljegren via use-livecode
The code will not work if you have htmltext containing the text "color=" like:
To set the color you can use color="#fa3b42"

and you can also shave off some milliseconds in the styledText version by using 
foreach:

…
repeat for each key aKey in tTextA
      # Check if first run has textcolor set
      put (tTextA[aKey]["runs"][1]["style"]["textcolor"] is empty) \
            into tTextA[aKey]["style"]["hidden"]
 end repeat
…

For me that is always faster than your clever 'offset("color="…' version.

It is a bit strange though that the foreach always seams to be faster. If we 
try to sum an array with 100 000 element like:

   put 10 into tNum
   # Create array with random numbers
   repeat with i = 1 to tNum
      put random(100) into tData[i]
   end repeat

   # Sum array by looping with index
   put the long seconds into tStart
   repeat with i = 1 to tNum
      add tData[i] to tSum
   end repeat
   put the long seconds - tStart into tTime1

   #Sum array by using foreach
   put the long seconds into tStart
   repeat for each key aKey in tData
      add tData[aKey] to tSum2
   end repeat
   put the long seconds - tStart into tTime2
   put tTime1 , tTime2, " ratio : " & tTime1 / tTime2

You will see that the second code is almost three times faster than the first 
one.

If it isn’t important that you process an indexed array in order 
foreach is always faster!

Happy coding!

:-Håkan
On 1 Dec 2018, 15:40 +0100, How to use LiveCode , wrote:
>
> if offset("color=",L)>0 then put " else put "http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-01 Thread Richard Gaskin via use-livecode

J. Landman Gay wrote:

> Right, and accessing a field is one of the most expensive operations
> in LC.
>
> Maybe Richard will post his analogy to the maintenance worker again. I
> found it both amusing and informative.

http://lists.runrev.com/pipermail/use-livecode/2005-May/057144.html

:)

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread J. Landman Gay via use-livecode

Right, and accessing a field is one of the most expensive operations in LC.

Maybe Richard will post his analogy to the maintenance worker again. I 
found it both amusing and informative.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 1, 2018 8:18:52 PM Tom Glod via use-livecode 
 wrote:



So the first form populates the field only oncesince its a single
command so no other states of the field will exist.

Makes perfect sense.

Thanks

On Sat, Dec 1, 2018 at 7:45 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:


Tom Glod wrote:

 > Can someone explain the seemingly extraordinary performance
 > improvement in using apparently its "split second" vs "over a minute"
 >
 > set the hidden of line 1 to - 1 of field 1 to false
 >
 > vs.
 >
 > repeat with i = 1 the number of lines of fld 1
 >   set the hidden of line i of fld 1 to false
 > end repeat
 >
 > it doesn't seem like the loop would be the bottleneck here, but rather
 > the work on the field itselfbut obviously, I know nothing about
 > this engine

Think about all the steps a computer needs to take to render text in a
field.

Multiply that by the number of lines...

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  
  ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread Tom Glod via use-livecode
So the first form populates the field only oncesince its a single
command so no other states of the field will exist.

Makes perfect sense.

Thanks

On Sat, Dec 1, 2018 at 7:45 PM Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Tom Glod wrote:
>
>  > Can someone explain the seemingly extraordinary performance
>  > improvement in using apparently its "split second" vs "over a minute"
>  >
>  > set the hidden of line 1 to - 1 of field 1 to false
>  >
>  > vs.
>  >
>  > repeat with i = 1 the number of lines of fld 1
>  >   set the hidden of line i of fld 1 to false
>  > end repeat
>  >
>  > it doesn't seem like the loop would be the bottleneck here, but rather
>  > the work on the field itselfbut obviously, I know nothing about
>  > this engine
>
> Think about all the steps a computer needs to take to render text in a
> field.
>
> Multiply that by the number of lines...
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   
>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread Richard Gaskin via use-livecode

Tom Glod wrote:

> Can someone explain the seemingly extraordinary performance
> improvement in using apparently its "split second" vs "over a minute"
>
> set the hidden of line 1 to - 1 of field 1 to false
>
> vs.
>
> repeat with i = 1 the number of lines of fld 1
>   set the hidden of line i of fld 1 to false
> end repeat
>
> it doesn't seem like the loop would be the bottleneck here, but rather
> the work on the field itselfbut obviously, I know nothing about
> this engine

Think about all the steps a computer needs to take to render text in a 
field.


Multiply that by the number of lines...

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread Tom Glod via use-livecode
Can someone explain the seemingly extraordinary performance improvement in
using apparently its "split second" vs "over a minute"

set the hidden of line 1 to - 1 of field 1 to false

vs.

repeat with i = 1 the number of lines of fld 1
  set the hidden of line i of fld 1 to false
end repeat

it doesn't seem like the loop would be the bottleneck here, but rather the
work on the field itselfbut obviously, I know nothing about this engine
:D

Thanks,



On Sat, Dec 1, 2018 at 9:40 AM hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> > Kaveh wrote:
> > I can confirm that the htmltext method works beautifully and blindingly
> fast.
>
> So we have here two methods:
> The htmlText-method and the styledText-method.
>
> There is an interesting result in the speed comparison of the two methods.
>
> Here the htmlText-method is significantly faster with less than at about
> 1500 short lines, between 1500 and 2500 short lines speed is at about the
> same, for more than at about 2500 short lines the styledText-method becomes
> significantly faster.
>
> As LC flattens any nested arrays the styledText-method is probably
> adjustable
> and worth the loop through the runs: styledText experts please come in.
>
> ## HtmlText-method for any colored text chunk in the line.
> on mouseUp
>   put the millisecs into m1
>   lock screen; lock messages
>   set linedelimiter to "   put the htmltext of fld 1 into ht
>   replace " hidden" with empty in ht
>   repeat for each line L in ht
> if offset("color=",L)>0 then put " else put "  end repeat
>  set htmltext of fld 1 to s
>  put the millisecs-m1 into fld "timing"
> end mouseUp
>
> ## StyledText-method for a whole colorized line.
> put the styledText of field "text" into tTextA
> # loop through paragraphs
> repeat with i = 1 to the number of elements of tTextA
>   # Check if first run has textcolor set
>   put (tTextA[i]["runs"][1]["style"]["textcolor"] is empty) \
>   into tTextA[i]["style"]["hidden"]
>   end if
> end repeat
> set the styledText of fld "text" to tTextA```
>
>
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread hh via use-livecode
> Kaveh wrote:
> I can confirm that the htmltext method works beautifully and blindingly fast.

So we have here two methods:
The htmlText-method and the styledText-method.

There is an interesting result in the speed comparison of the two methods.

Here the htmlText-method is significantly faster with less than at about
1500 short lines, between 1500 and 2500 short lines speed is at about the
same, for more than at about 2500 short lines the styledText-method becomes
significantly faster.

As LC flattens any nested arrays the styledText-method is probably adjustable
and worth the loop through the runs: styledText experts please come in.

## HtmlText-method for any colored text chunk in the line.
on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  set linedelimiter to "http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread Kaveh Bazargan via use-livecode
Apologies hh. I can confirm that the htmltext method works beautifully and
blindingly fast. I was going to try it to understand fully first. I now do
and am grateful for the amazing tricks I have learned here. :-)

On Sat, 1 Dec 2018 at 13:46, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
> > Kaveh wrote:
> > I am looking to hide any line that contains no textcolor anywhere.
>
> I already gave you one that hides *exactly* these lines
> (as you already wished in your first post).
>
> > Hermann wrote:
> > Here yet another fast method.
> >
> > on mouseUp
> >   put the millisecs into m1
> >   lock screen; lock messages
> >   put the htmltext of fld 1 into ht
> >   set linedelimiter to " >   put the htmltext of fld 1 into ht
> >   replace " hidden" with empty in ht
> >   repeat for each line L in ht
> > if offset("color=",L)>0 then put " > else put " >   end repeat
> >   set htmltext of fld 1 to  s
> >   put the millisecs-m1 into fld "timing"
> > end mouseUp
>
>
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-12-01 Thread hh via use-livecode


> Kaveh wrote:
> I am looking to hide any line that contains no textcolor anywhere.

I already gave you one that hides *exactly* these lines
(as you already wished in your first post).

> Hermann wrote:
> Here yet another fast method.
> 
> on mouseUp
>   put the millisecs into m1
>   lock screen; lock messages
>   put the htmltext of fld 1 into ht
>   set linedelimiter to "   put the htmltext of fld 1 into ht
>   replace " hidden" with empty in ht
>   repeat for each line L in ht
> if offset("color=",L)>0 then put " else put "   end repeat
>   set htmltext of fld 1 to  s
>   put the millisecs-m1 into fld "timing"
> end mouseUp


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-12-01 Thread Kaveh Bazargan via use-livecode
Hi all

I have learned a lot here, especially the hint of using styledText. But
there might be a misunderstanding. In my case, it is not necessarily the
whole line that is styled, but a line might *contain* a chunk of text that
is styled, e.g. one word in the middle of the line has textcolor set. So I
am looking to hide any line that contains no textcolor anywhere.

Trevors code contains:
...
 if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
...

If I understand correctly the ['runs'][1] is looking at the first element
of that line. I need to check that no other elements in the line are styled
either. Before I write a loop that is slow again, any quick way of checking
for a line with no style anywhere?

Thanks all for the great contributions.

K


On Fri, 30 Nov 2018 at 20:17, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Kaveh wrote:
>  > Now how many lines of JavaScript would that be? ;-)
>
> The equivalent of chunk expressions are ridiculously verbose in JS, but
> this one's not bad:
>
> getElementById("id").removeAttribute("style");
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   
>   ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Richard Gaskin via use-livecode

Kaveh wrote:
> Now how many lines of JavaScript would that be? ;-)

The equivalent of chunk expressions are ridiculously verbose in JS, but 
this one's not bad:


getElementById("id").removeAttribute("style");

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Geoff Canyon via use-livecode
Why do you need to simulate non-contiguous selections? Set the
listBehavior, multipleHilites, and noncontiguousHilites of the field to
true and then you can do things like:

set the hilitedLines of fld 1 to 1,3,5

But to your original question, you should use:

repeat for each line L in the htmlText of fld 1
  -- put some htmlText after a variable based on what L contains
end repeat
  -- set the htmlText of fld 1 to the new htmlText

Or if you know what you want to do and don't need to check the existing
textColor and hidden, just:

repeat for each line L in fld 1


Here's an example of what the htmlText looks like for a field where the
first line has a font color and the second line is hidden:

test
this
thing

So if you don't need to check the existing state your code would look
something like this:

put 0 into i -- if you need a line count
repeat for each line L in fld 1
 add 1 to i -- again, if you need a line count
 if  then
  put "" & L & ""
& cr after newHTML
else
   put "" & L & "" & cr after newHTML
end if
end repeat
set the htmlText of fld 1 to newHTML

gc


On Fri, Nov 30, 2018 at 8:36 AM Kaveh Bazargan via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I am simulating a non-contiguous selection of text with a "Find all" button
> that sets the style of all found items of text.
>
> Then I want to inspect those "selections" only but showing the paras that
> contain them and hiding all other lines. So I have a full view and a
> "compact" view that the user can choose by clicking a button
>
> On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I was wondering at what stage or how the lines get chosen to be hidden or
> > not?
> > ___
> > use-livecode mailing list
> > use-livecode@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  • Twitter
>  • LinkedIn
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Keith Clarke via use-livecode
In jQuery it’d be something like $j(‘div #id’).text(); selecting the field’s 
enclosing div by ID or class. 

Best,
Keith

> On 30 Nov 2018, at 17:43, Bob Sneidar via use-livecode 
>  wrote:
> 
> And how much would the Javascript training and certification cost be to learn 
> how to do it? ;-)
> 
> Bob S
> 
> 
>> On Nov 30, 2018, at 09:17 , Kaveh Bazargan via use-livecode 
>>  wrote:
>> 
>>> FWIW, the fastest way that I know to remove all text stylings from a field
>>> of text is this:
>>> 
>>> put fld 1 into fld 1
>>> 
>>> 
>> That's poetically beautiful. Now how many lines of JavaScript would that
>> be? ;-)
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Bob Sneidar via use-livecode
And how much would the Javascript training and certification cost be to learn 
how to do it? ;-)

Bob S


> On Nov 30, 2018, at 09:17 , Kaveh Bazargan via use-livecode 
>  wrote:
> 
>> FWIW, the fastest way that I know to remove all text stylings from a field
>> of text is this:
>> 
>> put fld 1 into fld 1
>> 
>> 
> That's poetically beautiful. Now how many lines of JavaScript would that
> be? ;-)


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
On Fri, 30 Nov 2018 at 17:12, Dan Friedman  wrote:

> Kaveh,
>
> Well, you learn something every day!   I didn't know you could hide a line
> of text.  Pretty cool!
>
>
Really nice. Working on speeding it up which will be great.


> FWIW, the fastest way that I know to remove all text stylings from a field
> of text is this:
>
> put fld 1 into fld 1
>
>
That's poetically beautiful. Now how many lines of JavaScript would that
be? ;-)


>
> -Dan
>
>
> On 11/30/18, 8:37 AM, "use-livecode on behalf of Kaveh Bazargan via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> I am simulating a non-contiguous selection of text with a "Find all"
> button
> that sets the style of all found items of text.
>
> Then I want to inspect those "selections" only but showing the paras
> that
> contain them and hiding all other lines. So I have a full view and a
> "compact" view that the user can choose by clicking a button
>
> On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I was wondering at what stage or how the lines get chosen to be
> hidden or
> > not?
> > ___
> > use-livecode mailing list
> > use-livecode@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  •
> Twitter
>  • LinkedIn
> 
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Dan Friedman via use-livecode
Kaveh,

Well, you learn something every day!   I didn't know you could hide a line of 
text.  Pretty cool!

FWIW, the fastest way that I know to remove all text stylings from a field of 
text is this:

put fld 1 into fld 1


-Dan
 

On 11/30/18, 8:37 AM, "use-livecode on behalf of Kaveh Bazargan via 
use-livecode"  wrote:

I am simulating a non-contiguous selection of text with a "Find all" button
that sets the style of all found items of text.

Then I want to inspect those "selections" only but showing the paras that
contain them and hiding all other lines. So I have a full view and a
"compact" view that the user can choose by clicking a button

On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was wondering at what stage or how the lines get chosen to be hidden or
> not?
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
I am simulating a non-contiguous selection of text with a "Find all" button
that sets the style of all found items of text.

Then I want to inspect those "selections" only but showing the paras that
contain them and hiding all other lines. So I have a full view and a
"compact" view that the user can choose by clicking a button

On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was wondering at what stage or how the lines get chosen to be hidden or
> not?
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Glen Bojsza via use-livecode
I was wondering at what stage or how the lines get chosen to be hidden or
not?
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
Did not know about textStyle which has opened a whole new world! Thank you
so much for ruining my weekend Trevor. ;-)

hh, I love the first solution, which shows the beauty of LiveCode. But the
speed is the same as before...

i will try htmltext too. A while since I worked with it.

Thanks again.

On Fri, 30 Nov 2018 at 15:33, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If showing *only* lines with colored text means that all others
> are hidden then you could use:
>
> ...
> set hidden of line i of fld "text" to \
> (the textcolor of line i of fld "text" is empty)
> ...
>
> Trevor's script would then read:
> ...
> put (tTextA[i]["runs"][1]["style"]["textcolor"] is empty) \
>  into tTextA[i]["style"]["hidden"]
> ...
>
> Here yet another fast method:
>
> on mouseUp
>   put the millisecs into m1
>   lock screen; lock messages
>   put the htmltext of fld 1 into ht
>   set linedelimiter to "   put the htmltext of fld 1 into ht
>   replace " hidden" with empty in ht
>   repeat for each line L in ht
> if offset("color=",L)>0 then put " else put "   end repeat
>   set htmltext of fld 1 to  s
>   put the millisecs-m1 into fld "timing"
> end mouseUp
>
>
> > > Kaveh wrote:
> > > 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?
> > >
> >
> > Trevor wrote:
> > Try working with the styledText property.
> >
> > put the styledText of field "text" into tTextA
> >
> > # loop through paragraphs
> > repeat with i = 1 to the number of elements of tTextA
> >   # Check if first run has textcolor set
> >   if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
> > # hide paragraph
> > put true into tTextA[i]["style"]["hidden"]
> >   end if
> > end repeat
> >
> > set the styledText of fld "text" to tTextA
>
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread hh via use-livecode
If showing *only* lines with colored text means that all others
are hidden then you could use:

...
set hidden of line i of fld "text" to \
(the textcolor of line i of fld "text" is empty)
...

Trevor's script would then read:
...
put (tTextA[i]["runs"][1]["style"]["textcolor"] is empty) \
 into tTextA[i]["style"]["hidden"] 
...

Here yet another fast method:

on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put the htmltext of fld 1 into ht
  set linedelimiter to " > Kaveh wrote:
> > 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?
> >
> 
> Trevor wrote:
> Try working with the styledText property.
> 
> put the styledText of field "text" into tTextA
> 
> # loop through paragraphs
> repeat with i = 1 to the number of elements of tTextA
>   # Check if first run has textcolor set
>   if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
> # hide paragraph
> put true into tTextA[i]["style"]["hidden"]
>   end if
> end repeat
> 
> set the styledText of fld "text" to tTextA

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Trevor DeVore via use-livecode
On Fri, Nov 30, 2018 at 7:08 AM Kaveh Bazargan via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 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?
>

Try working with the styledText property.

```
put the styledText of field "text" into tTextA

# loop through paragraphs
repeat with i = 1 to the number of elements of tTextA
  # Check if first run has textcolor set
  if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
# hide paragraph
put true into tTextA[i]["style"]["hidden"]
  end if
end repeat

set the styledText of fld "text" to tTextA
```

-- 
Trevor DeVore
CTO - ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

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 
mailto:use-livecode@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@lists.runrev.com
> wrote:
>
>> Hi Andre,
>>
>>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
use-livecode <
>> use-livecode@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
>> kl...@major-k.de 
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@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@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  • 
Twitter  • LinkedIn 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
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@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@lists.runrev.com> wrote:
> >
> >> Hi Andre,
> >>
> >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> >> use-livecode@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
> >> kl...@major-k.de
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@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@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

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@lists.runrev.com> wrote:


Hi Andre,


Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <

use-livecode@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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
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@lists.runrev.com> wrote:

> Hi Andre,
>
> > Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> use-livecode@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
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@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  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

Klaus,

uhahuahuahuaahuauhahuhuahuahua it took me a while to notice.

On 30/11/2018 11:56, Klaus major-k via use-livecode wrote:

Hi Andre,


Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode 
:

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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Klaus major-k via use-livecode
Hi Andre,

> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode 
> :
> 
> 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
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

tied locking the screen first?

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?



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Niggemann, Bernd via use-livecode
Try

set the hidden of line 1 to - 1 of field 1 to false


Kind regards

Bernd


From: Kaveh Bazargan

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?

--
Kaveh Bazargan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode