Is there a trick to overriding CharacterListManager.onShortcutDrop?
In current and past extensions I've had no problem overriding core things I need to add onto (but not actually mess with insides of).
For example:
Code:
local saveonShortcutDrop = nil;
function onInit()
Debug.console(tostring(CharacterListManager.onShortcutDrop)); -- I see a hex value
saveonShortcutDrop = CharacterListManager.onShortcutDrop;
CharacterListManager.onShortcutDrop = onShortcutDrop;
Debug.console(tostring(CharacterListManager.onShortcutDrop)); -- I see a different hex value
end
function onShortcutDrop(sIdentity, draginfo)
Debug.console("**** THIS IS MY STUFF *****");
-- call the original stuff first then call new stuff
local bReturn = saveonShortcutDrop(sIdentity, draginfo);
end
But for whatever reason doing this with CharacterListManager.onShortcutDrop in a test run where all I do is put out Debug.console print, it is not giving me any sign it is being called.
I can see a stack dump of the original call being called
[C]: in function 'openWindow'
[string "desktop/scripts/manager_characterlist.lua"]:147: in function <[string "desktop/scripts/manager_characterlist.lua"]:137>
(tail call): ?
(tail call): ?
But I see no sign that I am replacing it. I'm not in the stack - nor are my print statements showing. I can see the onInit() with hex values printed out so something is going on.
Is there something different between this CoreRPG\desktop\scripts\manager_characterlist.lua function and other script functions I have no problems with?
Note: I never include any of these in my extension file that I override as they are usually defined someplace else I end up getting access to.