Do not use : notation for simple tables (SimpleFarmTrack = {}), that's only meant to be used for objects created from ZO_Object:New (SimpleFarmTrack = ZO_Whatever:New() ) where you want top reference the object via self!
Example would be ZO_Smithing class -> Cretaed object SMITHING, where self references SMITHING then.
Read the Wiki about this or search the forums here for more info, use search term "notation" or "object" or "class" and similar.
Code:
SMITHING:DoSomething(param1, param2)
SMITHING.DoSomething(SMITHING, param1, param2)
Here you can see what functions expect to have as params/signature if you use the different types of notations. If you use object notation : and call the function only with ., the 1st param1 must be the object reference! If you use the : it will automatically use internally self = the object reference. But: If the object was only created as {} table the : notation might not be working (usually it does, and even self does work inside the functions with :, but it's somehow not correct then).
So your self:AddEventHandlers() should rather be SimpleFarmTrack.AddEventHandlers() as self is SipleFarmTrack and it is a table, so . notation instead of : and usage of self.
To ease it:
Change your addons code to simple . Notation for your function definitions and calls. Example:
Lua Code:
function SimpleFarmTrack.OnAddOnLoaded(eventId, addOnName)
...
EVENT_MANAGER:RegisterForEvent(
ADDON_NAME,
EVENT_ADD_ON_LOADED,
SimpleFarmTrack.OnAddOnLoaded
)
That way you do not have to wrap each call to the functions in an anonymous function(...) end around them, and can call them directly via table.function(params)
And in your OnAddOnLoaded event Handler make sure to unregister the EVENT_ADD_ON_LOADED again so your function OnAddOnLoaded won't fire and run for each other addon after your was was found!