Thread Tools Display Modes
07-10-07, 04:06 AM   #1
sAlAmAnDeR
A Murloc Raider
Join Date: Jul 2007
Posts: 4
Tablet Question

Hi, I'm sure this is a really stupid question, but here goes. I am working on an ace mod and I am trying to use Tablet-2.0 for tooltips. I have some code which, greatly reduced, comes down to this:
Code:
local Tablet = AceLibrary("Tablet-2.0")
stup = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceEvent-2.0", "AceDB-2.0")

function MakeTablet()
	Tablet:SetTitle("Hi, I am happy =D")
	local cat = Tablet:AddCategory(
		'id', 'main',
		'columns', 2)
	cat:AddLine("text1", "OMG",  "text2", "Why won't this work? =(")
	Tablet:SetHint("I am not happy anymore D=")
end


local myframe = CreateFrame("Frame",nil,UIParent)
stup:Print("Frame Created")
myframe:SetWidth(128)
myframe:SetHeight(128)
myframe:SetPoint("CENTER",0,0)
myframe:Show()
stup:Print("Frame Shown")
	
Tablet:Register(myframe,
		    'children',MakeTablet,
		    'point',  function() return "CENTER" end)
stup:Print("Tablet Registed: ", Tablet:IsRegistered(myframe)) -- prints true

Tablet:Open(myframe)
stup:Print("Tablet Opened") --but this is a lie!
So my question is... where is the tablet? I've looked through the API for tablet on the ace website but it doesn't address the steps necessary to just make the tablet appear...am I forgetting something obvious? Thanks
  Reply With Quote
07-10-07, 12:48 PM   #2
sAlAmAnDeR
A Murloc Raider
Join Date: Jul 2007
Posts: 4
Okay, since I haven't gotten any replies to the above question, perhaps this one will be a little easier... Lets say I decide to make my own tooltips from scratch. I think I know how to give them all the basic functionality I want them to have, but what I don't know how to do is to add lines of text to a frame. Can someone show me a short code snippet that creates a frame and prints "Hello World" in it? Thanks.
  Reply With Quote
07-10-07, 01:35 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
This is a forum, not a chat room. Have a little patience.
__________________
"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
07-13-07, 03:58 PM   #4
sAlAmAnDeR
A Murloc Raider
Join Date: Jul 2007
Posts: 4
Sorry for sounding impatient, I thought I might get more responses if I asked a question that people who were unfamiliar with tablet could also help with. I did manage to figure out the problem above...The tablet was created but it wasn't displayed... I had to make a call to Tabletetach in order to give it the effect that I wanted.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Tablet Question


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