>Can anyone tell me if this kind of thing is possible:
>
>-- ie work out distance to cover in x and y
>on globalToLocal pt, cr
>   return [#xx:(pt[#xx]-cr[#xx]), #yy:(pt[#yy]-cr[#yy])]
>end


As you probably have it going by now, yes you can do that. You can 
also use dot syntax (in a similar way to how it is in ActionScript 
and other languages):


on globaltolocal pt,cr
     return [#xx: pt.xx - cr.xx, #yy: pt.yy - cr.yy]
end


By the way, property lists may have seemed to be a good idea when you 
started this, but you can get at the elements of points easily, and 
you can do math on points, lists, and rects too. For example:

pts = [point(10,10),point(20,20),point(15,13)]

put pts
-- [point(10, 10), point(20, 20), point(15, 13)]

pts[2] = pts[2] - point(3,5)

put pts
-- [point(10, 10), point(17, 15), point(15, 13)]


-- 

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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