View Single Post
11/20/14, 06:56 PM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by circonian View Post
Lua Code:
  1. texture = "/OtherAddonName/textures/some_custom_texture.dds"
  2. cCntrl:GetNamedChild("Texture"):SetTexture(texture)
I'd try without the initial slash. I assume this works from inside OtherAddonName, it only doesn't work from yet another addon, right?
If the string directly doesn't work, you could create virtual texture controls in OtherAddonName, and clone those using CreateControlFromVirtual.

Originally Posted by circonian View Post
While I'm at it what is the difference, if any, to using either of these:
Lua Code:
  1. texture = "/OtherAddonName/textures/some_custome_texture.dds"
  2. texture = [[/OtherAddonName/textures/some_custome_texture.dds]]
Alternate syntax, no difference. It's for someone who wants double-quotes in the string and hates backslashes (I don't believe such person exists )
  Reply With Quote