WoW:API CreateFrame: Difference between revisions

Line 37: Line 37:
* The frame's OnLoad handler, which will only exist if inherited, will be executed during the CreateFrame call. Any OnLoad script handlers set after CreateFrame() will not execute; consider adding any non-inherited OnLoad code directly after a CreateFrame call or use XML frames instead.
* The frame's OnLoad handler, which will only exist if inherited, will be executed during the CreateFrame call. Any OnLoad script handlers set after CreateFrame() will not execute; consider adding any non-inherited OnLoad code directly after a CreateFrame call or use XML frames instead.
* The returned pointer is not necessary if you pass a frame name, however it is advised you store the pointer in a local instead of using the global name whenever possible for performance reasons.
* The returned pointer is not necessary if you pass a frame name, however it is advised you store the pointer in a local instead of using the global name whenever possible for performance reasons.
* See also [[API_Frame_SetScript]] to handle OnFunction scripts when not using a template.
* The most common uses for this function are:
* The most common uses for this function are:
** Creating anonymous [[Events (API)|event handlers]].
** Creating anonymous [[Events (API)|event handlers]].
Anonymous user