Quantcast
How to specify which module a matching interface name call goes to - WoWInterface
Thread Tools Display Modes
10-27-20, 12:51 AM   #1
Zimzarina
A Murloc Raider
Join Date: Aug 2019
Posts: 4
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))
  Reply With Quote
10-27-20, 06:20 AM   #2
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 1,978
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.
__________________
ESOUI AddOns | WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
10-27-20, 06:22 AM   #3
Vrul
An Onyxian Warder
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 366
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.
  Reply With Quote
10-27-20, 10:14 AM   #4
Zimzarina
A Murloc Raider
Join Date: Aug 2019
Posts: 4
Thanks! I should have noticed that.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to specify which module a matching interface name call goes to

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off