Thread: Multilanguage
View Single Post
06-28-13, 02:45 AM   #13
Choonstertwo
A Chromatic Dragonspawn
 
Choonstertwo's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 194
Originally Posted by Vlad View Post
It does use tooltip to store, it's both a table and a widget and if you try tooltip[1234] and it doesn't exist, then it calls the function at __index to do a lookup and store the result string at that position, so next time you call tooltip[1234] it returns the string instead of doing a lookup. I refer to the tooltip object using "self" in the function, it's the same object.
Yes, but all the tooltip's methods like :NumLines and :SetOwner are stored in the original tooltip metatable's __index table rather than the tooltip itself. Your __index function seems to bypass this table, meaning it can't access the methods.
  Reply With Quote