Perhaps you should use a function to add functions to frames.
For example:
Lua Code:
end
local function DoSomething(self, ...)
print("Hello")
end
local function DoALittleDance(self, ...)
print("Bonjour")
end
local function NowDoAHandStand(self, ...)
print("Aloha")
end
local function AddFunctionsToFrame(self)
self.func1 = DoSomething
self.func2 = DoALittleDance
self.func3 = NowDoAHandStand
end
local frame = CreateFrame('Frame')
local frame2 = CreateFrame('Frame')
AddFunctionsToFrame(frame)
AddFunctionsToFrame(frame2)
Seeing as you were playing with code here is an example you may have missed.
Lua Code:
local frame = CreateFrame()
local function TestFunction()
print("Hello")
end
print(TestFunction) -- prints the function identifier
frame.aFunc= TestFunction
print(frame.aFunc)
frame:aFunc()
TestFunction = function()
print("Goodbye")
end
print(TestFunction)
print(frame.aFunc) -- This will print the identifier of the original function