Originally Posted by deathangel1479
I think i have tryed this yesterday without result, but I will try again. Thanks for Reply.
......
if not WINDOW_MANAGER:GetControlByName("RMM_MAPS_"..iX..iY) then <--- function expected instead of nil
|
Have you redefined WINDOW_MANAGER somewhere? If WINDOW_MANAGER:GetControlByName() doesn't work, neither should WINDOW_MANAGER:CreateControl()
It's weird that this wouldn't work for you-- I use this all the time:
Lua Code:
tlw = WINDOW_MANAGER:GetControlByName("MODUI_TLW")
if(not tlw) then -- GetControlByName() returns nil if Control does not exist
tlw = WINDOW_MANAGER:CreateControl("MODUI_TLW", GuiRoot, CT_TOPLEVEL)
end