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


uploading new app to mac app store

2018-12-01 Thread kee nethery via use-livecode
I’m uploading a new app to the Mac App Store and at the same time, revising my 
LiveCode Lesson on the same.

Stuff has changed OR I’m just really missing something obvious.

I’ve got the app built, signed, all that good stuff. I’ve added it into 
developer.apple.com with it’s bundle ID of com.elloco.ellocotools and now I’m 
attempting to upload using the Application Loader accessed within Xcode. The 
error I’m getting is:

Application Loader is unable to upload your package.
No suitable application records were found. Verify your bundle identifier 
‘com.elloco.ellocotools’ is correct.

Has anyone uploaded a new macOS app with Xcode 10 (or would be willing to look 
over what I’ve done) who could help me figure out what I’ve done incorrectly? 
Happy to do a screen share and show you what steps I’ve taken.

Thanks in advance.

Kee Nethery
___
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: LC-apps for HC

2018-12-01 Thread J. Landman Gay via use-livecode
As far as I know, LC includes all the scripted paint commands that HC had, 
and adds native color besides. The stacks I've imported that used painting 
commands worked with few changes, mostly only needing to slow them down due 
to LC's faster engine and more modern CPUs.


The OP wants to emulate MacPaint, so image size limitations probably won't 
be an issue.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On December 1, 2018 7:53:03 PM hh via use-livecode 
 wrote:



Richard G. wrote:
... Is there anything in MacPaint that can't be done with LC's bitmap objects?


"That can't be done" wins always, because the only limit for LC is the sky
(more exactly, sadly, the sky below the 65535-limit for all coordinates).

But there's a lot of features that are not done with LC's bitmap objects.
Even in a comparison with the paint features of HC some are missing (which
of course can be done, because the limit ...).
___
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 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: LC-apps for HC

2018-12-01 Thread hh via use-livecode
> Richard G. wrote:
> ... Is there anything in MacPaint that can't be done with LC's bitmap objects?

"That can't be done" wins always, because the only limit for LC is the sky
(more exactly, sadly, the sky below the 65535-limit for all coordinates).

But there's a lot of features that are not done with LC's bitmap objects.
Even in a comparison with the paint features of HC some are missing (which
of course can be done, because the limit ...).
___
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


Magic "Integer" Circles

2018-12-01 Thread hh via use-livecode
Some of you may be interested in the following "mathy beauty".

Under all circles with integer radius 0 < r <= 1 there
are four "magic" ones with radius 5, 25, 65 and 325.
These four have relatively many points of *integers* (x,y)
such that x^2 + y^2 = r^2.
(These points are NOT rounded values that only approximate
the circle value but integer values that are *on* the circle).

Clearly there are at least four such points: 
(-r,0),(0,r),(r,0),(0,-r) -- if the origin is (0,0).

Now the relation of radius and number of such points may be such
that we can visually accept a polygon of these points as circles.

To comfort you (script for an option button):

on mouseDown
  put 5 & 25 & 65 & 325 into me
end mouseDown

on mouseUp
  put the label of me into R -- the radius = one of 5, 25, 65, 325
  if there is no grc "poly" then create grc "poly"
  set style of grc "poly" to "polygon"
  set opaque of grc "poly" to "true"
  set backColor of grc "poly" to "255,128,0"
  set markerDrawn of grc "poly" to "true"
  set markerPoints of grc "poly" to "0,0"
  set markerLineSize of grc "poly" to "3"
  set points of grc "poly" to integerPoints(R)
  set loc of grc "poly" to the loc of this card
end mouseUp

-- the circle origin is (0,0), so set the loc of the polygon later on!
function integerPoints rds
  switch rds
case 5
  -- a circle with radius r=5 contains these 12 points of integers:
  put (4,-3)&(3,-4)&(0,-5)&(-3,-4)&(-4,-3)&(-5,0)& \
  (-4,3)&(-3,4)&(0,5)&(3,4)&(4,3)&(5,0) into p
  break
case 25
  -- a circle with radius r=25 contains these 20 points of integers:
  put (24,-7)&(20,-15)&(15,-20)&(7,-24)&(0,-25)& \
  (-7,-24)&(-15,-20)&(-20,-15)&(-24,-7)&(-25,0)& \
  (-24,7)&(-20,15)&(-15,20)&(-7,24)&(0,25)& \
  (7,24)&(15,20)&(20,15)&(24,7)&(25,0) into p
  break
case 65
  -- a circle with radius r=65 contains these 36 points of integers:
  put (63,-16)&(60,-25)&(56,-33)&(52,-39)&(39,-52)& \
  (33,-56)&(25,-60)&(16,-63)&(0,-65)&(-16,-63)& \
  (-25,-60)&(-33,-56)&(-39,-52)&(-52,-39)& \
  (-56,-33)&(-60,-25)&(-63,-16)&(-65,0)&(-63,16)& \
  (-60,25)&(-56,33)&(-52,39)&(-39,52)&(-33,56)& \
  (-25,60)&(-16,63)&(0,65)&(16,63)&(25,60)& \
  (33,56)&(39,52)&(52,39)&(56,33)&(60,25)& \
  (63,16)&(65,0) into p
  break
case 325
  -- a circle with radius r=325 contains these 60 points of integers:
  put (323,-36)&(315,-80)&(312,-91)&(300,-125)& \
  (280,-165)&(260,-195)&(253,-204)&(204,-253)& \
  (195,-260)&(165,-280)&(125,-300)&(91,-312)& \
  (80,-315)&(36,-323)&(0,-325)&(-36,-323)& \
  (-80,-315)&(-91,-312)&(-125,-300)&(-165,-280)& \
  (-195,-260)&(-204,-253)&(-253,-204)&(-260,-195)& \
  (-280,-165)&(-300,-125)&(-312,-91)&(-315,-80)& \
  (-323,-36)&(-325,0)&(-323,36)&(-315,80)& \
  (-312,91)&(-300,125)&(-280,165)&(-260,195)& \
  (-253,204)&(-204,253)&(-195,260)&(-165,280)& \
  (-125,300)&(-91,312)&(-80,315)&(-36,323)& \
  (0,325)&(36,323)&(80,315)&(91,312)&(125,300)& \
  (165,280)&(195,260)&(204,253)&(253,204)& \
  (260,195)&(280,165)&(300,125)&(312,91)& \
  (315,80)&(323,36)&(325,0) into p
  break
  end switch
  return p & line 1 of p -- close polygon
end integerPoints

Below are the possible number of integer points for all integers radius
values r with 0 < r <= 1. Each of these numbers is followed by the two
smallest radii where these numbers occur.
TMHO, of these the 12:5, 20:25, 36:65 and 60:325 are acceptable to serve
alone as points of a polygon approximating a circle of radius r (see above).

[number of integer points:radius1,radius2]
4:1,2
12:5,10
20:25,50
28:125,250
36:65,85
44:3125,6250
60:325,425
84:1625,2125
100:4225,7225
108:1105,1885
180:5525,9425

For the math behind that last computation see http://oeis.org/A046109

___
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: LC-apps for HC

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

Ingar Roggen wrote:

> I recognize the importance of asking adequate questions. I don’t know
> if the one about MacPaint (MP) belongs to that group. But I use MP all
> the time with SheepShaver and believe that the partial scriptability
> of MP perhaps was HC’s greatest contribution to interactive use of
> words and images in thinking. It’s a question of coordinating logic
> and imagination. Ingar

MacPaint's feature set was pretty limited, by design.  It shipped with 
Macs as a way to show off bitmap graphics, but simple enough that it 
wouldn't compete with third-party offerings.


Is there anything in MacPaint that can't be done with LC's bitmap objects?

--
 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: LC-apps for HC

2018-12-01 Thread Ingar Roggen via use-livecode
Thank you, Kee

> 1. des. 2018 kl. 15.47 skrev Kee Nethery via use-livecode 
> :
> 
> Great clarification. Thank you. Your question now makes perfect sense to me, 
> and I don’t have the answer for you. Hopefully someone else does.
> 
> Kee Nethery
> 
>> On Dec 1, 2018, at 1:42 AM, Ingar Roggen  
>> wrote:
>> 
>> I recognize the importance of asking adequate questions. I don’t know if the 
>> one about MacPaint (MP) belongs to that group. But I use MP all the time 
>> with SheepShaver and believe that the partial scriptability of MP perhaps 
>> was HC’s greatest contribution to interactive use of words and images in 
>> thinking. It’s a question of coordinating logic and imagination. Ingar
>> 
>> Sendt fra min iPhone
>> 
>>> 1. des. 2018 kl. 06:36 skrev kee nethery via use-livecode 
>>> :
>>> 
>>> Livecode is a program for creating programs.
>>> MacPaint is a program for creating images that as far as I know ran on 68K 
>>> macs. Not sure it ever ran on PPC Macs. Not sure if MacPaint images can 
>>> import into Livecode.
>>> Asking if MacPaint works in LC doesn’t make sense to me.
>>> Kee
>>> 
 On Nov 30, 2018, at 2:02 PM, Ingar Roggen via use-livecode 
  wrote:
 
 But before that I would like to know if MacPaint works in LC. Anybody know 
 that?
 
 Sendt fra min iPhone
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> 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: LC-apps for HC

2018-12-01 Thread Kee Nethery via use-livecode
Great clarification. Thank you. Your question now makes perfect sense to me, 
and I don’t have the answer for you. Hopefully someone else does.

Kee Nethery

> On Dec 1, 2018, at 1:42 AM, Ingar Roggen  
> wrote:
> 
> I recognize the importance of asking adequate questions. I don’t know if the 
> one about MacPaint (MP) belongs to that group. But I use MP all the time with 
> SheepShaver and believe that the partial scriptability of MP perhaps was HC’s 
> greatest contribution to interactive use of words and images in thinking. 
> It’s a question of coordinating logic and imagination. Ingar
> 
> Sendt fra min iPhone
> 
>> 1. des. 2018 kl. 06:36 skrev kee nethery via use-livecode 
>> :
>> 
>> Livecode is a program for creating programs.
>> MacPaint is a program for creating images that as far as I know ran on 68K 
>> macs. Not sure it ever ran on PPC Macs. Not sure if MacPaint images can 
>> import into Livecode.
>> Asking if MacPaint works in LC doesn’t make sense to me.
>> Kee
>> 
>>> On Nov 30, 2018, at 2:02 PM, Ingar Roggen via use-livecode 
>>>  wrote:
>>> 
>>> But before that I would like to know if MacPaint works in LC. Anybody know 
>>> that?
>>> 
>>> Sendt fra min iPhone
>> 
>> 
>> 
>> 
>> ___
>> 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: LC-apps for HC

2018-12-01 Thread Ingar Roggen via use-livecode
I recognize the importance of asking adequate questions. I don’t know if the 
one about MacPaint (MP) belongs to that group. But I use MP all the time with 
SheepShaver and believe that the partial scriptability of MP perhaps was HC’s 
greatest contribution to interactive use of words and images in thinking. It’s 
a question of coordinating logic and imagination. Ingar

Sendt fra min iPhone

> 1. des. 2018 kl. 06:36 skrev kee nethery via use-livecode 
> :
> 
> Livecode is a program for creating programs.
> MacPaint is a program for creating images that as far as I know ran on 68K 
> macs. Not sure it ever ran on PPC Macs. Not sure if MacPaint images can 
> import into Livecode.
> Asking if MacPaint works in LC doesn’t make sense to me.
> Kee
> 
>> On Nov 30, 2018, at 2:02 PM, Ingar Roggen via use-livecode 
>>  wrote:
>> 
>> But before that I would like to know if MacPaint works in LC. Anybody know 
>> that?
>> 
>> Sendt fra min iPhone
> 
> 
> 
> 
> ___
> 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