Thanks all for tips and suggestions.
I was finally able to make it works in this way:
Lua Code:
local function HideIt(frame)
frame:HookScript("OnShow", frame.Hide)
frame:SetAlpha(0)
frame:Hide()
end
... other code ...
if cfg["cleanminimap"] == true then
-- load the stuff
LoadAddOn("Blizzard_TimeManager")
-- zone text
HideIt(MinimapZoneText)
HideIt(MinimapCluster.ZoneTextButton)
HideIt(MinimapCluster.BorderTop)
-- calendar
HideIt(GameTimeFrame)
-- tracking
HideIt(MinimapCluster.Tracking)
-- zooms
HideIt(Minimap.ZoomIn)
HideIt(Minimap.ZoomOut)
-- clock
HideIt(GameTimeFrame)
HideIt(TimeManagerClockButton)
end
I was not able to make it happens during PLAYER_LOGIN event but it was surely something I wrong in the event triggering.
Btw I think AnalogueClock is a very cute addons so'll use it instead
Thanks so muche to everyone... it is really appreciated.