Mikeprod / FriendGroups

Friend Groups addon (World of Warcraft) working with the current version of WoW
https://www.curseforge.com/wow/addons/friend-groups-continued
1 stars 4 forks source link

Error with astralkeys #47

Open xeropresence opened 4 years ago

xeropresence commented 4 years ago

New version throws an error

3x AstralKeys\Lists\Friends-Friends.lua:753: attempt to perform arithmetic on field 'maxWidth' (a nil value) AstralKeys\Lists\Friends-Friends.lua:753: in function <AstralKeys\Lists\Friends.lua:699> AstralKeys\Lists\Friends-Friends.lua:768: in function `OnEnter' FriendGroups\FriendGroups-8.2.5.lua:443: in function <FriendGroups\FriendGroups.lua:237> FriendGroups\FriendGroups-8.2.5.lua:467: in function <FriendGroups\FriendGroups.lua:450> FriendGroups\FriendGroups-8.2.5.lua:843: in function <FriendGroups\FriendGroups.lua:552> FriendGroups\FriendGroups-8.2.5.lua:1111: in function <FriendGroups\FriendGroups.lua:1093>

Causes the tab to not expand properly

Mikeprod commented 4 years ago

Apparently the FriendsTooltip.maxWidth is not defined right away when expending a group. I suggest you to report it directly to the Astral Keys author.

For your information I wrapped the 753 and 754 as follow : if FriendsTooltip and FriendsTooltip.maxWidth then FriendsTooltip:SetWidth(min(FRIENDS_TOOLTIP_MAX_WIDTH, FriendsTooltip.maxWidth + FRIENDS_TOOLTIP_MARGIN_WIDTH)); FriendsTooltip:SetHeight(FriendsTooltip.height + (stringShown and 0 or (FRIENDS_TOOLTIP_MARGIN_WIDTH + 8))) end