関数をオーバーライドしてパラメーター値を検査したいのですが、それを呼び出して元のパラメーターを通常どおり渡します。これは可能ですか?www.coronalabs.comのCorona SDKを使用しています
現在、動作しない私のコードは次のとおりです。
-- getting a refrence to the original function so i can replace it with my overriding function
local newcircle = display.newCircle
-- my override
display.newCircle = function(...)
-- attempt to pass the parameters to this function on to the real function
local t = {...}
newcircle(unpack(t))
end
-- calling the overridden function as if it were normal
display.newCircle( display.newGroup(), "image.png" )