ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   API 100030 and slashCommandAutoComplete (https://www.esoui.com/forums/showthread.php?t=8988)

Phuein 02/24/20 09:10 PM

API 100030 and slashCommandAutoComplete
 
Looks like the recent update modified the chat system a bit. For those who may need it, I just had to fix this for my addons.

1) Looks like slash commands are now loaded safely at EVENT_ADD_ON_LOADED.

2) For slash commands modified during live play, accessing the refresh method changed from:
Code:

SLASH_COMMAND_AUTO_COMPLETE:InvalidateSlashCommandCache()
To:
Code:

CHAT_SYSTEM.textEntry.slashCommandAutoComplete:InvalidateSlashCommandCache()

Seems odd the devs removed the global reference. Hopefully the chat system is improving. If anybody has a best-practice for this, I'm always happy to learn.

:banana::banana::banana::banana::banana:

Dolgubon 02/24/20 10:36 PM

Thank you!!! This wasn't directly what I needed but it the file that had it had the stuff I needed to fix my guild reorder addon and I really needed that

ArtOfShred 02/25/20 01:25 AM

I think you can actually just use:
Code:

SlashCommandAutoComplete:InvalidateSlashCommandCache()
At least on the last PTS build I had extracted "SlashCommandAutoComplete" was global. I guess I better double check now.

Phuein 02/25/20 10:41 AM

You're welcome :)

And no, SlashCommandAutoComplete is the [child] class, so using it shouldn't work. Would be odd if it did. Here's how the chat defines it in esoui/ingame/chatsystem/sharedchatsystem.lua line 145:

Code:

self.slashCommandAutoComplete = SlashCommandAutoComplete:New(...

ArtOfShred 02/25/20 11:40 AM

Quote:

Originally Posted by Phuein (Post 40356)
You're welcome :)

And no, SlashCommandAutoComplete is the [child] class, so using it shouldn't work. Would be odd if it did. Here's how the chat defines it in esoui/ingame/chatsystem/sharedchatsystem.lua line 145:

Code:

self.slashCommandAutoComplete = SlashCommandAutoComplete:New(...

Ah thanks then! I need to update this on my end. They must have changed it sometime between PTS releases.


All times are GMT -6. The time now is 09:03 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI