View Single Post
12-06-17, 04:04 PM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
The colon in Lua is essentially shorthand for passing "self", or "this" as it used to be called. When using the colon, you're telling the function you're calling to automatically accept the object before the colon as the first argument. Without the colon, you're just calling the function itself. The dot is irrelevant here, it's just a way to access the function within the table. This can be confusing at times due to WoW's frame objects and the inherit functions that live in a frame's table.

Adding to the last function example of Haste's reply, this is also the same:

Code:
function ns["UpdateAuraIcon"](ns, button)
  Reply With Quote