Thread Tools Display Modes
02/24/20, 09:10 PM   #1
Phuein
 
Phuein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 132
Post 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.

  Reply With Quote
02/24/20, 10:36 PM   #2
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
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
  Reply With Quote
02/25/20, 01:25 AM   #3
ArtOfShred
 
ArtOfShred's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 103
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.
  Reply With Quote
02/25/20, 10:41 AM   #4
Phuein
 
Phuein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 132
Post

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(...
  Reply With Quote
02/25/20, 11:40 AM   #5
ArtOfShred
 
ArtOfShred's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 103
Originally Posted by Phuein View Post
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.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » API 100030 and slashCommandAutoComplete

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