Thanks for the suggestion!
Indeed, the code below works:
Lua Code:
if not GameTooltip.GetBackdrop then
print("No GetBackdrop")
Mixin(GameTooltip, BackdropTemplateMixin)
else
print("GetBackdrop")
end
The Mixin call doesn't really fix the problem, because now I don't get an error for calling a function the doesn't exist (attempt to call method 'GetBackdrop' (a nil value)), but GetBackdrop returns nil on the Retail client (works fine on BCC and Classic)
What I'm curious now is:
1. My understanding is that GameTooltip is a
global object created by the API itself. Is this correct?
2. What is the proper fix for my original problem (attempt to call method 'GetBackdrop' (a nil value)), or the second (GetBackdrop returning nil after the Mixin call)?
3. This used to work on 90100. Why is it broken now?
4. The double-colon syntax denotes a class, while the period denotes an object, right (I come from C++)? My understanding is that in Lua they're the same thing as Lua is prototype-based. Why do I have to use a different syntax in the test and in the call?
Thanks!!!