Drawing a line in LC7

Terence Heaford t.heaford at icloud.com
Sun Mar 1 15:15:40 EST 2015


LC need to change the documentation.

  Tip:  When setting the points property, you can separate the individual points with a comma instead of a return. The points property is always reported with the points on separate lines, however.


Makes life rather challenging & irritating.

Thanks for your help.


All the best

Terry



> On 1 Mar 2015, at 19:17, Richard Gaskin <ambassador at fourthworld.com> wrote:
> 
> Terence Heaford wrote:
> 
> > I use the following routine to draw lines for charts in LC 6.7.3
> >
> > on drawLine x,y,x1,y1,tColor
> >    lock screen
> >    set the style of the templateGraphic to polygon
> >    create grc in me
> >    put the id of the last grc of me into tID
> >    set the forecolor of grc id tID to tColor
> >    set the points of grc id tID to x,y,x1,y1
> >    set the locked of grc id tID to true
> >    unlock screen
> > end drawLine
> >
> > When I run the project in LC 7.0.3 the lines do not draw.
> > Is there a reason for this?
> >
> > When I look in the group, all the graphics exist.
> 
> Looks like they fixed a bug in v7:
> 
> The correct format for the points property is that each point is a comma-separated pair, with each pair separated by CR.
> 
> Apparently older versions allowed multiple points on a single comma-delimited line.
> 
> If you change this:
>    set the points of grc id tID to x,y,x1,y1
> 
> ..to this:
>    set the points of grc id tID to x,y &cr& x1,y1
> 
> ..it works fine.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com                http://www.FourthWorld.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list