Setting hidden of lines very slow

classic Classic list List threaded Threaded
56 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Setting hidden of lines very slow

Pi Digital via use-livecode
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
Director
River Valley Technologies <http://rivervalleytechnologies.com/> • Twitter
<https://twitter.com/kaveh1000> • LinkedIn
<https://www.linkedin.com/in/bazargankaveh/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
Hi Andre,

> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <[hidden email]>:
>
> 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
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <[hidden email]>:
>>
>> 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital 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 <
[hidden email]> wrote:

> Hi Andre,
>
> > Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> [hidden email]>:
> >
> > 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
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> 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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <
> [hidden email]> wrote:
>
>> Hi Andre,
>>
>>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
>> [hidden email]>:
>>> 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
>> [hidden email]
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <
[hidden email]> 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 <
> > [hidden email]> wrote:
> >
> >> Hi Andre,
> >>
> >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> >> [hidden email]>:
> >>> 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
> >> [hidden email]
> >>
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> 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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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
> <[hidden email] <mailto:[hidden email]>>
> 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 <
>     > [hidden email]
>     <mailto:[hidden email]>> wrote:
>     >
>     >> Hi Andre,
>     >>
>     >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>     use-livecode <
>     >> [hidden email]
>     <mailto:[hidden email]>>:
>     >>> 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
>     >> [hidden email] <mailto:[hidden email]>
>     >>
>     >>
>     >> _______________________________________________
>     >> use-livecode mailing list
>     >> [hidden email]
>     <mailto:[hidden email]>
>     >> Please visit this url to subscribe, unsubscribe and manage your
>     >> subscription preferences:
>     >> http://lists.runrev.com/mailman/listinfo/use-livecode
>     >>
>     >
>
>     _______________________________________________
>     use-livecode mailing list
>     [hidden email] <mailto:[hidden email]>
>     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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital via use-livecode
On Fri, Nov 30, 2018 at 7:08 AM Kaveh Bazargan via use-livecode <
[hidden email]> 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital 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 "<p"
  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 "<p" & L after s
    else put "<p hidden" & L after s
  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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <
[hidden email]> 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 "<p"
>   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 "<p" & L after s
>     else put "<p hidden" & L after s
>   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
> [hidden email]
> 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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
I was wondering at what stage or how the lines get chosen to be hidden or
not?
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <
[hidden email]> wrote:

> I was wondering at what stage or how the lines get chosen to be hidden or
> not?
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> 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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

LC-apps for HC

Pi Digital via use-livecode
In reply to this post by Pi Digital via use-livecode
Hello, André,
I hope you still remember that we met in Las Vegas. I still use HyperCard and wonder if it has become easier to port HC-stacks to LiveCode? Do you know if there are any apps for that? And if not, would it be difficult to write them?
Regards
Ingar

Sendt fra min iPhone

> 30. nov. 2018 kl. 14:41 skrev Andre Alves Garzia via use-livecode <[hidden email]>:
>
> 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 <[hidden email] <mailto:[hidden email]>> 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 <
>>    > [hidden email]
>>    <mailto:[hidden email]>> wrote:
>>    >
>>    >> Hi Andre,
>>    >>
>>    >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>>    use-livecode <
>>    >> [hidden email]
>>    <mailto:[hidden email]>>:
>>    >>> 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
>>    >> [hidden email] <mailto:[hidden email]>
>>    >>
>>    >>
>>    >> _______________________________________________
>>    >> use-livecode mailing list
>>    >> [hidden email]
>>    <mailto:[hidden email]>
>>    >> Please visit this url to subscribe, unsubscribe and manage your
>>    >> subscription preferences:
>>    >> http://lists.runrev.com/mailman/listinfo/use-livecode
>>    >>
>>    >
>>
>>    _______________________________________________
>>    use-livecode mailing list
>>    [hidden email] <mailto:[hidden email]>
>>    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/>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital 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" <[hidden email] on behalf of [hidden email]> 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 <
    [hidden email]> wrote:
   
    > I was wondering at what stage or how the lines get chosen to be hidden or
    > not?
    > _______________________________________________
    > use-livecode mailing list
    > [hidden email]
    > 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/>
    _______________________________________________
    use-livecode mailing list
    [hidden email]
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
On Fri, 30 Nov 2018 at 17:12, Dan Friedman <[hidden email]> 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" <[hidden email] on behalf of
> [hidden email]> 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 <
>     [hidden email]> wrote:
>
>     > I was wondering at what stage or how the lines get chosen to be
> hidden or
>     > not?
>     > _______________________________________________
>     > use-livecode mailing list
>     > [hidden email]
>     > 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/>
>     _______________________________________________
>     use-livecode mailing list
>     [hidden email]
>     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/>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital 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 <[hidden email]> 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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: LC-apps for HC

Pi Digital via use-livecode
In reply to this post by Pi Digital via use-livecode
I'll jump in here.

Porting/opening Hypercard stacks is a convenience. The primary issue is that Hypercard was optimized to index every text of every card in a stack to make finding information easier. New records? New cards.

Livecode? Not so much. In fact, not at all. There will be performance issues. But at least your field and button layouts will be intact, and you scripting *should* work out of the box.

At that point, your next task will be to refactor your app to switch to a database oriented app with single form layouts as opposed to multiple cards as records. Getting the information out of your cards and into a database, although not difficult, will have to be scripted. So far as I know, there is nothing that can "automagically" do that for you.

Bob S


> On Nov 30, 2018, at 09:02 , Ingar Roggen via use-livecode <[hidden email]> wrote:
>
> Hello, André,
> I hope you still remember that we met in Las Vegas. I still use HyperCard and wonder if it has become easier to port HC-stacks to LiveCode? Do you know if there are any apps for that? And if not, would it be difficult to write them?
> Regards
> Ingar

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Setting hidden of lines very slow

Pi Digital via use-livecode
In reply to this post by Pi Digital 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 <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
123