Originally Posted by votan
No, no, sorry, as I said, I can not remember. But I can remember, that this function was called with a nameless parent. I printed out the names for debugging.
Any particular reason why it is so important? Did we miss something?
|
No, there is no real issue. I'm just saying. It works both ways. It's just that I don't like controls named LAMCombobox1.
Players do not care about control names, so there is nothing wrong with the way how it is now.
I was just trying to explain that in your code is used:
Lua Code:
local name = parent:GetName()
This can return nil instead of string because parent could be unnamed submenu. Thats why I've suggested using:
Lua Code:
local panel = parent.panel or parent
local name = panel:GetName()
So you will always get correct control name.