View Single Post
03/10/15, 04:59 PM   #11
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Oh I was doing it wrong, I was able to reproduce it.
I was right clicking on my name & clicking "Edit Note" I didn't realize there was a note button to click on.
If I click on the note button next to my name & do what you said I do get the error.

It looks like this is the problem here:
When you click on the row note button, it calls:
Lua Code:
  1. <OnClicked>
  2.    ZO_KeyboardGuildRosterRowNote_OnClicked(self)
  3. </OnClicked>

Lua Code:
  1. function ZO_KeyboardGuildRosterRowNote_OnClicked(control)
  2.     -- Which calls this:
  3.     GUILD_ROSTER_KEYBOARD:Note_OnClicked(control)
  4. end

and GUILD_ROSTER_KEYBOARD is defined/created here:
Lua Code:
  1. function ZO_KeyboardGuildRoster_OnInitialized(control)
  2.     GUILD_ROSTER_KEYBOARD = ZO_KeyboardGuildRosterManager:New(control)
  3. end

and ZO_KeyboardGuildRosterManager is a subclass of ZO_SocialListKeyboard:
Lua Code:
  1. local ZO_KeyboardGuildRosterManager = ZO_SocialListKeyboard:Subclass()

So its actually calling this function:
Lua Code:
  1. function ZO_SocialListKeyboard:Note_OnClicked(control)
  2.     local data = ZO_ScrollList_GetData(control:GetParent())
  3.     ZO_Dialogs_ShowDialog("EDIT_NOTE", {displayName = data.displayName, note = data.note, changedCallback = self.noteEditedFunction})
  4. end

Which means its trying to set:
Lua Code:
  1. changedCallback = GUILD_ROSTER_KEYBOARD.noteEditedFunction
  2. -- because self = GUILD_ROSTER_KEYBOARD

but GUILD_ROSTER_KEYBOARD doesn't have a noteEditedFunction
The noteEditedFunction is in: GUILD_ROSTER_MANAGER


Somewhere it needs to set the noteEditedFunction. Cant do it in the ZO_SocialListKeyboard:Note_OnClicked(control), because its shared with the friends list note edit, (maybe others too).
The easiest solution would probably be to just set it right here, right before it calls the function to show the dialog:
Lua Code:
  1. function ZO_KeyboardGuildRosterRowNote_OnClicked(control)
  2.     GUILD_ROSTER_KEYBOARD.noteEditedFunction = GUILD_ROSTER_MANAGER:GetNoteEditedFunction()
  3.     GUILD_ROSTER_KEYBOARD:Note_OnClicked(control)
  4. end

Or give it its own function to show the dialog, like they did with the ignore list:
Lua Code:
  1. function ZO_KeyboardIgnoreListManager:IgnoreListPanelRowNote_OnClicked(control)
  2.     local data = ZO_ScrollList_GetData(control:GetParent())
  3.     if data then
  4.         local displayName, note = GetIgnoredInfo(data.index)
  5.         ZO_Dialogs_ShowDialog("EDIT_NOTE", {displayName = displayName, note = note, changedCallback = IGNORE_LIST_MANAGER:GetNoteEditedFunction()})
  6.     end
  7. end

By the way: The Friends list has the same bug

Last edited by circonian : 03/10/15 at 06:32 PM.
  Reply With Quote