Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Inconsistent event listener syntax
Started by romualdaspaskevicius Aug 24 2018 12:26 AM

No replies to this topic
event listener api
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

romualdaspaskevicius

[GLOBAL: userInfoPane.html]
romualdaspaskevicius
  • Observer

  • 1 posts
  • Corona SDK

Hello,

 

I noticed that event listeners have an inconsistent syntax. :huh:

 

I would like to know the difference between:

balloon:addEventListener( "tap", pushBalloon )

and:

balloon.collision = onLocalCollision
balloon:addEventListener( "collision" )

pushBalloon and onLocalCollision are both functions.

 

Keep in mind I'm a complete newbie to LUA (and Corona itself) but I do have experience in other programming languages.

 

Thanks! :)




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: event listener, api