OmniCC

OmniCC

54M Downloads

v5.0.7 error on accessing Rules

Road-block opened this issue ยท 1 comments

commented

I had created with the previous version (prior to 5.0.5 beta) a group for "Addon Buttons" and rules to skip showing cooldowns on some specific buttons created by addons - either because they provided their own cooldown animations or it just didn't fit.

Upon switching from "Default" to "AddonButtons" (my custom group) from the top-right dropdown in options and trying to access the Rules tab I get this error.

2x OmniCC_Config\panels\rules.lua:14: attempt to index field "db" (a nil value)
OmniCC_Config\panels\rules.lua:14: in function <OmniCC_Config\panels\rules.lua:13>
OmniCC_Config\panels\rules.lua:28: in function "GetGroupRules"
OmniCC_Config\panels\rules.lua:67: in function "GetItems"
OmniCC_Config\widgets\listEditor.lua:297: in function "UpdateList"
OmniCC_Config\widgets\listEditor.lua:250: in function "OnShow"
OmniCC_Config\widgets\listEditor.lua:293: in function <OmniCC_Config\widgets\listEditor.lua:254>
<in C code>
OmniCC_Config\mainPanel.lua:204: in function <OmniCC_Config\mainPanel.lua:183>

Locals:
self = OmniCCOptions_Rules {
 0 = <userdata>
 AddWidgets = <func> @OmniCC_Config\panels\rules.lua:34
 UpdateValues = <func> @OmniCC_Config\panels\rules.lua:41
 rules = OmniCCOptions_RulesAdjust Group Rules {}
 GetGroupRules = <func> @OmniCC_Config\panels\rules.lua:27
 AddRulesEditor = <func> @OmniCC_Config\panels\rules.lua:45
}
groupIdToGroup = <func> @OmniCC_Config\panels\rules.lua:13
OmniCCOptions = <table> {
 AddTab = <func> @OmniCC_Config\mainPanel.lua:354
 ListEditor = <unnamed> {}
 FontSelector = <unnamed> {}
 Group = <table> {}
 GetGroupId = <func> @OmniCC_Config\mainPanel.lua:363
 ColorSelector = <unnamed> {}
 Dropdown = <unnamed> {}
 CheckButton = <unnamed> {}
 RadioButton = <unnamed> {}
 GetGroupSets = <func> @OmniCC_Config\mainPanel.lua:359
 SetGroupId = <func> @OmniCC_Config\mainPanel.lua:367
 RadioGroup = <unnamed> {}
 Slider = <unnamed> {}
}
commented

This initial error was trivial to fix, I just replaced OmniCC.db on the offending line with OmniCC4Config.

However while that allowed me access to the list of buttons I had "blacklisted" in my group, trying to manage them calls a method that's been removed.

1x OmniCC_Config\panels\rules.lua:60: attempt to call method "RecalculateCachedGroups" (a nil value)
OmniCC_Config\panels\rules.lua:60: in function "OnRemoveItem"
OmniCC_Config\widgets\listEditor.lua:343: in function "RemoveItem"
OmniCC_Config\widgets\listEditor.lua:275: in function <OmniCC_Config\widgets\listEditor.lua:275>

Locals:
self = OmniCCOptions_RulesAdjust Group Rules {
 0 = <userdata>
 OnAddItem = <func> @OmniCC_Config\panels\rules.lua:49
 buttons = <table> {}
 scrollChild = <unnamed> {}
 text = OmniCCOptions_RulesAdjust Group RulesText {}
 GetItems = <func> @OmniCC_Config\panels\rules.lua:66
 OnRemoveItem = <func> @OmniCC_Config\panels\rules.lua:55
 scrollBar = <unnamed> {}
 selected = "ArchyDistanceIndicatorFrameSurvey"
 editFrame = OmniCCOptions_RulesAdjust Group RulesEditFrame {}
 scrollFrame = <unnamed> {}
}
value = "ArchyDistanceIndicatorFrameSurvey"