Chapter 9: Page 158 - 'Using Solid Colors'

The code example under this heading is missing a <Texture> tag in order to work properly. The correct code is as follows:

  <Frame name="RedSquareTest" parent="UIParent">
    <Size x="50" y="50"/>
    <Anchors>
      <Anchor point="CENTER"/>
    </Anchors>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Color r="1.0" g="0.0" b="0.0" a="0.5"/>
        </Texture>
      </Layer>
    </Layers>
  </Frame>

The equivalent Lua definition is:

  CreateFrame("RedSquareTest", nil, UIParent)
  RedSquareTest:SetSize(50, 50)
  RedSquareTest:SetPoint("CENTER"", 0, 0)
  RedSquareTest.texture = RedSquareTest:CreateTexture(nil, "BACKGROUND")
  RedSquareTest.texture:SetAllPoints(true)
  RedSquareTest:SetTexture(1.0, 0.0, 0.0, 0.5)