Originally Posted by Slakah
nah I was being special :P. This would work.
Code:
if getmetatable(CreateFrame("Frame")).__index == getmetatable(CreateFrame("Frame")).__index then
print("Frames share same metatable")
else
print("Slakah fails and is special")
end
|
THAT works, FRAMES have shared metatables, but you seam to forget:
Code:
Animation
AnimationGroup
Button
CheckButton
ColorSelect
ControlPoint
Cooldown
DressUpModel
EditBox
Font
FontInstance
FontString
GameTooltip
LayeredRegion
MessageFrame
Minimap
Model
MovieFrame
ParentedObject
PlayerModel
QuestPOIFrame
ScriptObject
ScrollFrame
ScrollingMessageFrame
SimpleHTML
Slider
StatusBar
TabardModel
Texture
So:
Code:
local f = CreateFrame("Frame")
local tex = f:CreateTexture()
print(getmetatable(f).__index==getmetatable(tex).__index)
RESULT: False.
There is an other difference between this and OmniCC, OmniCC securehooks the "SetCooldown" function. Once they got their hands on the setcooldown function it works for ALL metatables, because metatables do have shared functions. But if you add a function to "Frame" it's not automaticly added to "texture".