Thread Tools Display Modes
02-11-09, 07:28 PM   #1
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
.lua frame not appearing

Used to XML, trying to get the hang of doing it all .lua

Code:
function CFM_CreateConfig()
	-- Create config frame
	local f = CreateFrame("Frame", "CFM_Config", UIParent)
	f:SetWidth(100)
	f:SetHeight(100)
	f:SetPoint("Center")
	f:SetBackdrop({
		bgFile = "Interface\DialogFrame\UI-DialogBox-Background",
		edgeFile = "Interface\DialogFrame\UI-DialogBox-Border",
		tile = "true",
		tileSize = 32,
		edgeSize = 32,
		insets = {left = 11, right = 12, top = 12, bottom = 11}
		})
	f:SetBackdropColor(0,0,0,1)
end
Results in no frame, either mod called or /script called.
  Reply With Quote
02-11-09, 07:54 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You need to escape the backslashes in your file paths.

bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
02-11-09, 08:10 PM   #3
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Just found that as I was looking through the AddOn builder info. Thx for the reply though!
  Reply With Quote
02-11-09, 08:58 PM   #4
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Now with editboxes:

Code:
local e = CreateFrame("EditBox", "CFM_EditBox1", CFM_Config)
e:SetWidth(100)
e:SetHeight(25)
e:SetMaxLetters(20)
e:SetPoint("TOPLEFT")
e:SetBackdrop({
  bgFile="",
  edgeFile="Interface\\Tooltips\\UI-Tooltip-Border",
  tile="true",
  tileSize= 32,
  edgeSize=16,
  insets = {left=5, right=5, top=5, bottom=5}
  })
e:SetText("EditBox Test")
Frame appears, no text inside. When attempting to type something into it, just a small blinker.
  Reply With Quote
02-15-09, 11:36 PM   #5
cloudwolf
A Black Drake
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 87
e:SetFontObject("GameFontNormalSmall")
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » .lua frame not appearing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off