-
Posted by newbie on Sun, 29 Sep 2013 10:32:39
Hi,
I'm receiving an error "Attempt to index global Box", --frame.lua This is the line:
Box:SetText("Dummy Text")
The interface is located in frame.xml, and frame.xml holds the correct path to frame.luaThe addon works as intended, my slash commands works, frames are being loaded,.. but I would like to get rid of this error and I have no clue why i'm receiving it.
Any ideas ?
-
Posted by jnwhiteh on Sun, 29 Sep 2013 16:12:46
At the point that line is being called, 'Box' doesn't exist. I would delay that code until it does. Where are you calling that?
-
Posted by newbie on Sun, 29 Sep 2013 16:14:12
At the point that line is being called, 'Box' doesn't exist. I would delay that code until it does. Where are you calling that?
The box is created in Frame.xml and I call that line in Frame.lua I'm using the correct Box name, so I still don't know what's going wrong here
-
Posted by jnwhiteh on Sun, 29 Sep 2013 16:18:38
Well if frame.lua is loaded from frame.xml, then they're in the wrong order. Use the table of contents file instead, load frame.xml first and then load frame.lua. That should fix things.
-
Posted by newbie on Sun, 29 Sep 2013 18:04:43
Well if frame.lua is loaded from frame.xml, then they're in the wrong order. Use the table of contents file instead, load frame.xml first and then load frame.lua. That should fix things.
The thing is that I'm not receiving any errors when I disable the addon "Swatter", and everything seems to work fine when that addon is disabled, once I enable the addon I get the error. I moved the order of contents as you suggested but that doesn't seem to change a thing.
I also think that swatter is used a lot so just ignoring this error would be ignorant I assume
-
Posted by jnwhiteh on Sun, 29 Sep 2013 19:07:16
Yes, the error should be addressed. Perhaps you can post some of your code.