|
09-16-10, 11:59 PM | #1 |
the _G changes.
can someone explain this better. "The getglobal and setglobal functions are considerd deprecated, and have been removed from the C API's. In the interests of compatibility there remain lua implementations of both, but new code should be updated to use x = _G[globalName] and _G[globalName] = x instead."
what code should be updated? i think this is where the problems with my ui are but not exactly sure why does it mean things like this _G[prefix .. slots[id]] need to be changed? or _G[this:GetName().. ? |
|
09-17-10, 12:14 AM | #2 |
No, only setglobal(prefix .. slots[id], "SOMEVALUE") needs to be updated to _G[prefix .. slots[id]] = "SOMEVALUE".
If you didn't use setglobal or getglobal, then you shouldn't be worried.
__________________
Three things are certain, Death, taxes and site not found, You, victim of one. |
|
09-17-10, 07:52 AM | #3 |
hmmm, well im still confused then about one change or another. I get what appears to be the same value = nil error on a few different chunks of code. some of the chunks are as follows.
lua Code:
or this chunk lua Code:
and last but not least this chunk also lua Code:
all works on live servers so it has to be the cata changes that caused this im just not sure which one or why. |
|
09-17-10, 08:55 AM | #4 |
09-17-10, 09:31 AM | #5 | ||
Beoko
Guest
Posts: n/a
|
|
||
Beoko |
09-17-10, 09:45 AM | #6 |
my use of "this" in the tooltips code i changed to self and got a way different error, i dont think the use of this in that instance is the same as what was changed? if so i should of been able to simply change this to self or at lest that was my understanding.
the exact line that it starts in the 3rd chunk of code is this one, it says "this" is a nil value _G[this:GetName().."EditBox"]:SetText(_G.GTipNotesDB[t] or "") in the first chunk of code it is this one, this one says "frame" is a nil value local region = GetNormalTexture(frame:GetRegions()) in the 2nd chunk of code im not sure which line it was i have to go back and check. |
|
09-17-10, 10:13 AM | #7 | |
Code:
Frame:function() Note that if you add the parameter yourself, you don't have to call it self. You may use whatever name suits your fancy. |
||
09-17-10, 11:43 AM | #8 |
Only the last error has anything to do with the changes to this, and only changing this to self won't fix it, you also need to update the function declarations to include that self is passed:
lua Code:
The issue with FriendsFrame code is that Blizzard changed it and no longer uses/sets FriendsFrameFriendsScrollFrame.usedButtons: lua Code:
Part of the problem with the first error is that the ammo slot was removed which is what slots[0] is, so remove the start variable and always begin with an id of 1: lua Code:
There may still be errors after making those changes, I don't have access to check, but at least you will be one step closer to fixing it. |
|
WoWInterface » AddOns, Compilations, Macros » Cataclysm Beta » the _G changes. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|