View Single Post
05/12/14, 12:08 PM   #6
Roupine
Join Date: May 2014
Posts: 18
Originally Posted by deathangel1479 View Post
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:
  1. tlw = WINDOW_MANAGER:GetControlByName("MODUI_TLW")
  2. if(not tlw) then -- GetControlByName() returns nil if Control does not exist
  3.   tlw = WINDOW_MANAGER:CreateControl("MODUI_TLW", GuiRoot, CT_TOPLEVEL)
  4. end
  Reply With Quote