The problem seems to be the value 9.

 gListOfPointsCatA probably has only 8 items in the list.  The bit:

 getAt(glistOfPointsCatA, i+1) resolves to
 getAt(glistOfPointsCatA, 9)

and  9 is too big for the list... the error message you got about "List
Expected for Handler" is misleading. (call it a director bug)

Change your code to:

 repeat with i = 1 to 8
  member("canvas").image.draw(getAt(glistOfPointsCatA, i),
  getAt(glistOfPointsCatA, (i mod 8) + 1), [#shapeType:#line, #lineSize:2,
#color:  rgb(150, 0, 0)])
 end repeat


Nice job condensing your code... small is good.

Mike

> repeat with i = 1 to 8
> member("canvas").image.draw(getAt(glistOfPointsCatA, i),
> getAt(glistOfPointsCatA, i+1), [#shapeType:#line, #lineSize:2, #color:
> rgb(150, 0, 0)])
> end repeat



[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to