WoW:UIHANDLER OnLoad: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{stub/API}}
{{widgethandler}}
{{widgethandler}}
== Description ==


The OnLoad handler is called when a frame is created.
Called when a frame is created


  frame = CreateFrame("Frame"); -- frame created, OnLoad handler called
  OnLoad(frame)
frame:SetScript("OnLoad", function() print("Frame loaded") end); -- never called


== Arguments ==
== Parameters ==
=== Arguments ===
* frame (frame) - the frame being created


self - the frame being created
== Details ==
The OnLoad handler is called when a frame is created.
-- frame created, OnLoad handler called here
frame = CreateFrame("Frame")
-- never called
frame:SetScript("OnLoad", function() print("Frame loaded") end)

Revision as of 05:43, 13 February 2021

Widget handlers < OnLoad

Called when a frame is created

OnLoad(frame)

Parameters

Arguments

  • frame (frame) - the frame being created

Details

The OnLoad handler is called when a frame is created.

-- frame created, OnLoad handler called here
frame = CreateFrame("Frame") 

-- never called
frame:SetScript("OnLoad", function() print("Frame loaded") end)