Daisy

Addons
326 Downloads Last Updated: Sep 11, 2016 Game Version: 7.0.3

The Daisy function allows you to daisy-chain setters (or any function) on any object without having to re-reference your source object in a separate instruction.

local FTFrame = CreateFrame("FRAME")
Daisy(FTFrame)
	:EnableMouse(true)
	:SetFrameStrata("MEDIUM")
	:SetWidth(200)
	:SetHeight(16)
	:SetPoint("CENTER", 0, 50)
	:SetBackdrop({bgFile = "Interface\\DialogFrame\\UI-DialogBox-Gold-Background"})
	:SetBackdropColor(0,0,0,0.5)

It works by creating an object (the daisy object) that propagates function calls to the provided object, but always returns the daisy object. This allows us to continuously call functions on the return value of any functions we call on the daisy object.

Comments

Posts Quoted: