promotional bannermobile promotional banner

Daisy

Makes configuring objects with lots of settings a little easier.
<p>This is a daisy chain.</p>

This is a daisy chain.

Description

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.

The Daisy Team

profile avatar
  • 2
    Projects
  • 541
    Downloads

More from _ForgeUser6641885

  • Digest project image

    Digest

    • 0
    • Addons

    Digests events and filters them into function calls.

    • 0
    • July 5, 2013
    • Addons
  • Digest project image

    Digest

    • 0
    • Addons

    Digests events and filters them into function calls.

    • 0
    • July 5, 2013
    • Addons