WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   How to specify which module a matching interface name call goes to (https://www.wowinterface.com/forums/showthread.php?t=58349)

Zimzarina 10-27-20 12:51 AM

How to specify which module a matching interface name call goes to
 
Hi, in an addon I am trying to call a built in blizzard code function specifically AutoComplete_Update. However calling it directly with simply AutoComplete_Update(etc does not get the correct one. There are two such matching functions in the blizzard code (details below). How do I force lua to call the specific one I want (The in AutoComplete.lua is the one I wish to use.)? Thanks!
_retail_\BlizzardInterfaceCode\Interface\FrameXML\AutoComplete.lua
Line 144: function AutoComplete_Update(parent, text, cursorPosition)
vs
_retail_\BlizzardInterfaceCode\Interface\FrameXML\ChatFrame.lua
Line 4893: AutoComplete_Update(self, target, self:GetUTF8CursorPosition() - strlenutf8(command) - 1);
Line 4922: AutoComplete_Update(self, target, utf8Position - strlenutf8(command) - strlen(whitespace))

SDPhantom 10-27-20 06:20 AM

The first you listed is the function definition while the other two are calls to it.
That aside, without being able to see your code, it's impossible to debug it.

Vrul 10-27-20 06:22 AM

There is only one function declaration for AutoComplete_Update and that is in AutoComplete_Update.lua. All other mentions of AutoComplete_Update are just calling the function from AutoComplete_Update.lua.

Zimzarina 10-27-20 10:14 AM

Thanks! I should have noticed that.


All times are GMT -6. The time now is 10:01 AM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI