View Single Post
02/23/15, 08:01 AM   #8
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by votan View Post
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:
  1. 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:
  1. local panel = parent.panel or parent
  2. local name = panel:GetName()
So you will always get correct control name.
  Reply With Quote