Explanation
When a function is added to a dictionary within a dictionary, then the ‘Open Script Function’ viewer menu is opened (Alt + F ), the path is displayed incorrectly - it misses the dots between dictionary ‘levels’. As is shown in the example below, it displays the path as Dict1Dict2.FunctionA()
instead of Dict1.Dict2.FunctionA()
.
Nesting the dictionaries further results in each key being shown directly after each other without the dots being added between:
Reproduction
- Create a script, which contains a nested dictionary (2 or more levels deep) that has a function contained within. (Example code below)
- Open the function viewer (Alt + F )
- Observe the path being shown incorrectly.
2 Level Nested Dictionary Code Example
local Dict1 = {
["Dict2"] = {)
}
Dict1.Dict2.FunctionA = function()
end
Dict1.Dict2.FunctionB = function()
end
5 Level Nested Dictionary Code Example
local Dict1 = {
["Dict2"] = {
["Dict3"] = {
["Dict4"] = {
["Dict5"] = {}
}
}
}
}
Dict1.Dict2.Dict3.Dict4.Dict5.FunctionA = function()
end
Dict1.Dict2.Dict3.Dict4.Dict5.FunctionB = function()
end
Requiring a module containing the nested dictionaries also exhibits the same problem:
Device Info
Operating System: Windows 10
CPU: Ryzen 5 3600
GPU: GTX 1650 Super
RAM: 16GB @ 3600MHz