Originally Posted by elcius
you can't just call GarrisonMissionButton_OnClick, if you want to hook the click handler, use button:HookScript('OnClick',function() .. end)
|
I don't want to hook it because Blizzard doesn't check for LeftButton and I don't want to show mission details when clicking a mission with the right mouse button.
But I did another test by adding a frame on top of the button that catches the clicks (so the mission button's OnClick handler doesn't get executed) and I still get the error, even if my OnClick handler is as simple as this (and basically does nothing, it only sets isZoneSupport, just like Blizzard does in OrderHallMission.OnClickMission):
Lua Code:
local missionButton = self:GetParent();
local missionFrame = missionButton:GetParent():GetParent():GetParent():GetParent():GetParent();
local missionInfo = missionButton.info;
missionFrame.MissionTab.isZoneSupport = missionInfo.isZoneSupport;
This is easily reproducable without any addons by clicking a mission, executing
Lua Code:
/run OrderHallMissionFrame.MissionTab.isZoneSupport = OrderHallMissionFrame.MissionTab.isZoneSupport;
and pressing escape twice.