Quantcast
WoWInterface - View Single Post - Execute slash cmd/Function from another addon
View Single Post
09-02-08, 03:09 AM   #4
Mera
Retired of WoW, In ESO :)
 
Mera's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 331
Originally Posted by Scale View Post
So if i understand i just have to copy:

aUF:setVisibilityOption(CurrentRaidSet, 1)

And paste it where i need it, but then when i run it:

attempt to call method 'setVisibilityOption' (a nil value)
I have got a look at ag source and you wont be able to use SetVisibility or I don't see the trick to do it because this is not aUF:SetVisibility which is set but

Code:
local function setVisibilityOption(option, value)
this is a local function and not global so you cannot call it outside the addon, you will have to write another function that is doing the same thing than the auf one, it's calling SetVisibility() auf api which this one is global

Code:
function aUF.classes.aUFgroup.prototype:SetVisibility()
self:UpdateRaidSet()
if self.database.Hidden == true
or self.database.Exists == false
or (not (self.raidSetVisible) and self.type == "raid")
or (self.type == "raid" and aUF.db.profile.units.raid.HideFrame == true)
or (self.type == "party" and (aUF.db.profile.units.party.HideFrame == true or (aUF.db.profile.RaidHideParty and UnitInRaid("player")) ))
or (self.type == "partypet" and (aUF.db.profile.units.partypet.HideFrame == true or (aUF.db.profile.RaidHideParty and UnitInRaid("player")) )) then
  self.header:Hide()
  self.anchor:Hide()
  else
    self.header:Show()
  end
end
and can be called, it's not that easy to use addons functions from source directly so if you are really not fine with addon, better to start understanding from scratch
__________________
If you need to reach me I'm in ESO, @class101 or "Fathis Ules i"
addons: SpamBayes, BrokerCPU
projects: ThunderBayes
Mera[xeh]? - La CroisadeEcarlate (wow)
  Reply With Quote