Heya,
I just downloaded the Pinch Zoom Gesture sample code from the Ansca’ examples. One thing confused me; line 100 is:
if ( #previousTouches \> 0 ) then
-- must be at least 2 touches remaining to pinch/zoom
self.distance = nil
I’ve never seen a #prefix before. Is it a typo, or is it dark Lua magic I’ve not yet mastered? previousTouches is just a simple table indexed by event.id.
previousTouches = {}
self.previousTouches = previousTouches
Presumably it’s a typo and it could just be:
if previousTouches then
...
However would love to know if there’s more going on. [import]uid: 11757 topic_id: 9369 reply_id: 309369[/import]