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().. ? |
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. |
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. |
Quote:
|
Quote:
|
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. |
Quote:
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. |
You still have to define self with Frame:function() like so
Code:
Frame:function(self) |
Quote:
Quote:
|
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. |
Ah, yes, you're right. I was confusing Frame:function with Frame.function. :o
|
Quote:
|
Obi Vrul Kanobi, you were right on the friends list coloring. Something is amiss on the item boarder though still as well as the notes button. Just finally got into beta for some reason it was freezing up on the load screen for the last hour. heh.
|
For the item border code you need to make a similar change to the UpdateItemQualityBorders function:
lua Code:
For the notes code the OnAccept function should be: lua Code:
Also, both EditBox functions have "_G[self:GetParent():GetName() .. 'EditBox']:GetText()" which is the same as "self:GetText()" so you may want to change that. However, I think that whole section of code could use some cleaning up: lua Code:
|
I wanted to ask. what i could do with this. as i felt that its about the same. the error i get is based on not being able to local the editbox no more for cata.;
Code:
local editbox = _G[dialog:GetName().."WideEditBox"] i think i fixed it. was due to they re,pved WideEditBox/ as i see on an other post. |
Vrul - okay so remember you had said before i should remove the default db stuff which i did. I wonder if that is where i broke this? I have made all the changes you suggested and still get errors as far as it thinking the db is a nil value certain changes make that happen and certain things break the /commands. Im still really not understanding the use of _G now because almost everything that is broken, not just in the GrimUI has to do with _G. like baggins is borked and it has to do with the _G usage again and i just dont see why?
My entire move frames code is borked to in cata but im not even going there right now lol. I also noticed something strange with the item coloring on the inspect window, when you inspect 2-3 items will have the boarder, then inspect again and more appear until you inspect like 3 times and they all are there then. Is this because of the inspect throttle stuff? Or some other problem? The tipnotes looks like this, this is with all changes you have suggested including the one months ago about the default db not being stuffed into the base lua. lua Code:
|
Quote:
Code:
local addonName, addon = ... Quote:
|
how do we get into the new cata code? Is there an "addonkit" like for live wow where it decompiles the mpq's into readable lua's?
|
Quote:
|
All times are GMT -6. The time now is 07:15 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI