Thread Tools Display Modes
08-10-09, 05:43 PM   #1
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Get script function?

Trying to debug some stuff and trying to see what functions are assign to scripts.

Tried:
Code:
/script print(CharacterFrame:GetScript("OnShow"))
which prints
Code:
function 10204B60
How do I decipher this into something useful (like the function itself)?
  Reply With Quote
08-10-09, 06:40 PM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Not sure if there's a way to do this. Why don't you just extract Blizzard's FrameXML code though? You can look in CharacterFrame.lua
  Reply With Quote
08-10-09, 09:53 PM   #3
Sythalin
Curse staff
 
Sythalin's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 680
Because I'm attempting to hook into these scripts and want to make sure it's doing it correctly.
  Reply With Quote
08-10-09, 11:18 PM   #4
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Originally Posted by ChaosInc View Post
Because I'm attempting to hook into these scripts and want to make sure it's doing it correctly.
Code:
local func1 = CharacterFrame:GetScript("OnShow")
CharacterFrame:HookScript("OnShow", print)
local func2 = CharacterFrame:GetScript("OnShow")
if func1 ~= func2 then
  -- hook successful
end
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Get script function?


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