Sorry, boys and girls, I'm just a tad late to the party; couldn't locate my
leopard-skin posing briefs . . .

Anyway . . .

LC 7.0.3

tried this in a button:

on mouseUp
   drawline 0,100,100,400,red
end mouseUp

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

and, APPARENTLY got nothing . . .

on closer observation found that a graphic had been created; what was WRONG
was that the points had NOT been set . . .

So, checked the ID of the graphic that had been created and tried THIS in the MessageBox:

set the points of grc id 1009 to 0,500,100,900

and NO points were set . . .

BUT they were with LC 6.7

SO, went and looked in the Dictionary: "The points of a graphic is a list of points (two integers separated by a comma), one per line."

"AHA", I theatrically said, posing in a suitably pensive posture and looking round to see who was
admiring my craggy, philosophical pose: the cat bit me on the nose.

So tried the "carriage return" thing, & YES, it worked . . . of course the Documentation was RIGHT all along, it was the pre-7 IDE
that was wrong.

Mind you . . . I wondered if you couldn't do the same sort of thing with an ARRAY?

Richmond.



_______________________________________________
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

Reply via email to