Function question

What is the different between these:

Obj:function and Obj.function ? [import]uid: 117426 topic_id: 20511 reply_id: 320511[/import]

Obj:function(myParameter)

is the same as

Obj.function(self, myParameter)

In languages like Javascript and C++, the “this” object is passed behind the scenes and is just available to any function. In Lua, you have to explicitly pass “self”. the : version just implicitly passes it for you.

[import]uid: 19626 topic_id: 20511 reply_id: 80427[/import]