Originally Posted by Ketho
|
The OOP is almost everywhere, using CreateFrame to create a frame, then use frame:SetSize(100, 200) is also an OOP style code.
Use ace like LibStub("AceAddon-3.0"):NewAddon(name), it's no diff to Scorpio("MyTestAddon").
So, using the OOP for addon development is not the problem. From the 7.0, the Mixin system also is an OOP system, it has multi-inheritance and stackable event handlers, but it's too complex and require the XML system.
Take the AdventureMap_CombatAllyMissionPinTemplate as example :
XML Code:
<Frame name="AdventureMap_CombatAllyMissionPinTemplate" enableMouse="true" mixin="AdventureMap_CombatAllyMissionPinMixin" virtual="true">
Lua Code:
AdventureMap_CombatAllyMissionPinMixin = CreateFromMixins(MapCanvasPinMixin,AdventureMap_MissionPinMixin);
In my system, it'd be defined like :
Lua Code:
class "MapCanvasPin" { Frame }
class "AdventureMap_MissionPin" { MapCanvasPin }
class "AdventureMap_CombatAllyMissionPin" { AdventureMap_MissionPin }
It'd be more clearly for their definitions.