(Created page with "{{framexmlfunc|SecureHandlers.lua}} Stores a frame handle on a given frame. secureHandlerFrame:SetFrameRef("label", refFrame) SecureHandlerSetFrameRef(frame, "label", refFra...") |
m (Ddcorkum moved page API SecureHandlerSetFrameRef to API SecureHandlerBaseTemplate SetFrameRef without leaving a redirect: SecureHandlers) |
(No difference)
|
Revision as of 02:36, 12 October 2021
- This function is implemented in
FrameXML/SecureHandlers.lua
.
- This function is implemented in
Stores a frame handle on a given frame.
secureHandlerFrame:SetFrameRef("label", refFrame) SecureHandlerSetFrameRef(frame, "label", refFrame)
Arguments
- self/frame
- Frame - Frame on which to set the frame reference.
- The method version of the call is available only on SecureHandler*Template-inheriting frames.
- label
- String - Label using which to store the frame handle for later retrieval.
- refFrame
- Frame - Frame for which a handle should be created.
Example
The following snippet demonstrates how to transfer a frame handle to the restricted environment:
local secureHandlerFrame = CreateFrame("FRAME", nil, nil, "SecureHandlerBaseTemplate") secureHandlerFrame:SetFrameRef("UIParent", UIParent) secureHandlerFrame:Execute([[ UIParent = self:GetFrameRef("UIParent") ]]);
Notes
- This function cannot be called in combat lockdown.
- Handles may be retrieved from within the restricted environment using
refHandle = handle:GetFrameRef("label")