Thread Tools Display Modes
Prev Previous Post   Next Post Next
06/25/14, 04:55 AM   #1
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Saved vars and API version (or: I might have screwed up)

There has been some trouble with the saved vars beign reset (due do changes how they are saved/accessed). And suddenly I reliased:
Damn, that is good so. Becuase my addon (UTC) might break/damage the chat if it is apllying 100003 version settings for version 100007 chat (I am not sure it actually will. Would need the patchnotes and tests for that).

My Addon stores and applies data on wich ChatTab has wich Chatcategory enabeled (is listening to those channels). Categories are identified by a int. It also synchs Category Colors.
So naturally when gathering the data I go over all categories from 1 too GetNumChatCategories().
When applying it I go over all the int's from 1 to #StoredCategories.

This works if the number of chat categories stayed the same or increases and new were appended at the end.
This fails horribly if they changed the order of Chat Categories and/or added new ones in the middle. It is like Race Condition 101 all over.
I just need to figure out how to get the API version and use default data in the OnLoaded if the version differs.

I just thought I mention that because you might run into similar issues if you itterate over anything and write it back to the UI.

Last edited by zgrssd : 06/25/14 at 05:14 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » Saved vars and API version (or: I might have screwed up)


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