If you need help debugging...
If anyone is having problems in WotLK, I am open to assist in solving those bugs or problems. It seems to be one of my best talents.
I only have a 70 mage on Northend. |
1 Attachment(s)
I posted this over on the official UI forum, but I figure I might find more direcxt answers here, especially if you're proficient with forum code debugging too, Zero.
I started maintaining the Visor2 addon a few years ago for the TBC release, and being very much a Lua novice and not knowing any better, I kept the global-args pattern that it was using (which I've discovered is rather antiquated =). So fast forward to the present, and I'm finally getting around to updating this addon for the 3.0 Beta and discovered that the "self.args" reference the code has been using (see below) is now coming up as "nil" in Beta and throwing an error. I'm assuming this related primarily to the blizzard changes quoted below, but the way I'm implementing the arg's seems to be an equal contributor to the problem. Quote:
Code:
local options = { Code:
for _, v in pairs(self.args) do So essentially, I'm wondering if anyone has a quick reference or in-code example of the new/proper way to implement addon arg's these days... specifically within the Ace2 or Ace3 framework, but any tips are appreciated. Edit2: The more I familiarize myself with the code again, I'm probably confusing the "args" sub-table within the global "options" table (see the code in my last post), with the "self.args" variable. I'm starting to think they're two separate entities, so I'll have to dig a bit deeper. I just thought of something else as well... need to double-check that I have the latest set of Ace2 libs that are WotLK compatible. I'll d/l and test a bit further when I get home this evening. The "self.args" is likely defined and manipulated within the framework. Thanks! |
try options.args
The problem is I don't see what self is set to or what function that code block is in. Regardless if you only have one options table, and it's local to the file that your code block is in you should be able to access it via options.args. If it still comes up nil then either it's being nil'd out before that code is ran or it's a scope problem. |
Actually the more I think this over the more I'm confused as to what you are trying to do . . . if just updating to the WoLK compatible branch of the Ace2 libs doesn't fix it then PM me the entire file so I can look through it and look for scope, etc.
|
Turns out I goofed when updating to the WotLK-capable Ace2 libraries.
Grabbed the correct ones earlier today, and things are working fine now. |
That is good. I was waiting to reply until after I seen the problem for myself, but I first had to update my beta client, and then find time between work. (Want to hunt down co-worker that quit.)
|
All times are GMT -6. The time now is 03:19 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI