Wikia

WoWWiki

Watchlist Recent changes

API Frame SetScript

Main Menue



Sets the action handler for this frame.

frame:SetScript("handler", function)

Parameters Edit

Arguments Edit

("handler", func)
handler 
String - The handler to attach func to (OnShow, OnEvent, et al)
func 
Function - The function to call. nil to remove the handler. func is called with arguments (frame, arg1, arg2, ...) (event being arg1 for OnEvent handlers)

Example Edit

for i = 1, 4 do
    local frame = getglobal("PartyMemberFrame"..i)
    frame:SetScript("OnShow", frame.Hide)
end

ResultEdit

All party frames will be hidden whenever they're shown.

PartyMemberFrame1:SetScript("OnShow", nil)

ResultEdit

Removes the OnShow handler from PartyMemberFrame1.


Pages on WoWWiki

94,146pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,612photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki