Code:
function MyAddOn_OnInitialized(self)
--Register on the top level control...
self:RegisterForEvent(EVENT_GROUP_INVITE_RECEIVED, OnGroupInviteReceived)
--OR, register with a string unique to your add-on
EVENT_MANAGER:RegisterForEvent("MyAddOn", EVENT_GROUP_INVITE_RECEIVED, OnGroupInviteReceived)
end
Let me see if I understand this. Basically you register for your app to listen for an event in my case it would be something like a change in exp. When my addon notices the event I'm looking for happen it calls the function you list in the arguments of the RegisterForEvent?