Just came across this thread. I was surprised to find this didn't break TSM_Crafting, but not being able to open alts' professions is very lame and I see a lot of tickets / questions about that in my future...
EDIT: Will add my support to the wow forums thread.
Is there some list somewhere of undocumented 5.2 changes to the UI/APIs that addon developers should know about? Specifically, old APIs that no longer work or work differently than they did prior. If not, here's one I've come across and I'd be curious to hear about any others.
So, I know it's possible to upload an addon using a script, but I'm wondering if it's possible to create a ticket via a POST request. I've tried just changing the url to the create-ticket URL but got a 404 error (expected a 405 since I was actually doing a GET request for testing).
If POST requests aren't supported for creating tickets, any tips as to how I could accomplish this would be greatly appreciated. My website scripting experience is very limited.
The frame I'm trying to "hide" has many levels of children which are things ranging from scroll frames to buttons to text to popup frames to progress bars to anything else you'd find in an auction house addon. Basically, I want to hide everything without triggering any OnHide events.
EDIT: I guess I could set the scale of the top level frame to zero. Anybody see any issues with doing this?
EDIT2: Guess you can't set a frame's scale to 0, and when I tried 0.0001, it still had a height of 1 which looks kind of weird. I guess I could hide that height of 1 frame behind the AH frame and hope nobody notices...
EDIT3: Ok I feel silly now. It turns out :SetAlpha does automatically propagate down to children...so nevermind this thread :)
So, in some situations, my addon places a frame behind the auction frame in order to allow stuff to run "in the background." While this may sound like an unnecessary "hack" and something that shouldn't be done in the first place, I can assure you that there's good reasons for why I do it that way.
Anyways, here's my question. Some users have addons that make their auction frame transparent, which makes my frame look ugly hiding behind the auction frame. I'm wondering what the best way around this would be. Is there a way to make a frame and all it's children opaque without having to iterate through everything? I've also considered moving my frame off the screen instead of having it hide behind the auction house, but I'm not sure that'd be a good idea.
Thanks
PS: Oh hey this is my 100th post, I feel special :cool:
Usually, it does not make sense to use loadstring on a literal string. For instance, the code
f = loadstring("i = i + 1")
is roughly equivalent to
f = function () i = i + 1 end
but the second code is much faster, because it is compiled only once, when the chunk is compiled. In the first code, each call to loadstring involves a new compilation. However, the two codes are not completely equivalent, because loadstring does not compile with lexical scoping. To see the difference, let us change the previous examples a little:
local i = 0
f = loadstring("i = i + 1")
g = function () i = i + 1 end
The g function manipulates the local i, as expected, but f manipulates a global i, because loadstring always compiles its strings in a global environment.
Basically it doesn't matter where you call loadstring from, it will always use the global environment (assuming you don't mess with setting the environment or anything) rather than taking into account the environment from which the function is called. That's why your "Question A" and "Question B" code both returned nil.
PS: A simple implementation of assert if your curious what it does:
function assert(something, errorMsg)
if something then
return something
else
if errorMsg then
error(errorMsg)
else
error("whatever the default assert error message is...")
end
end
It's useful for loadstring because if the string you are trying to load into a function causes a complier error, loadstring will return nil as the first value and an error message as the second. Doing loadstring inside an assert will cause any errors to go to the default error handler (ie show up in wow) rather than it just being a silent failure.
Eh, I just realized that what I originally planned on doing wouldn't be practical at all so I'll just have to figure out some static font sizes that'll fit. Thanks for the replies though :)
So I'm probably just way over-thinking and over-complicating this, but here is what I'm attempting to do. I have a frame with a known width and height. I have a FontString that I want to put into that frame which contains text of unknown length. Is there any way to "dynamically" adjust the size of the font that the fontstring is using to be as large as possible while still containing the full text within the frame?
I am the author of TradeSkillMaster (see my signature), which has become one of the most widely used addons for making gold off the auction house / professions in a relatively short amount of time (the Auctioning module was originally based on Quick Auctions 3). In a few weeks the amount of free time I will have to work on TSM will be significantly reduced due to RL stuff. I will still be working on it fairly regularly, but I'd like to see new features added at a faster pace than I alone will be able to. There is certainly no shortage of things to be done on this addon.
Keep in mind that this is a hobby and not a job so you really have to be motivated to contribute. I am looking for people who have a solid programming background (lua / wow addon background would be great). If you use this addons that's obviously a plus, but certainly not a requirement. While this is a volunteer project, I have been known to be generous with curse reward points 8).
If you are interested or have any questions, please contact me in IRC (tradeskillmaster.wikispaces.com/IRC).
If you want it to be ordered, you need to use a numerically indexed table rather than dictionary-style table.
For example:
local myTable = {"Item1", "Item2", "Item3"}
instead of:
local myTable = {a="Item1", b="Item2", c="Item3"}
If you use something like the first table above, the dropdown will be in the same order as your table which you can easily control.
EDIT: sorry upon more reading I noticed you're trying to use that 2nd argument to the API, which I have no experience with. So, my answer may or may not be useful.
Not exactly a video but more a guide than anything else I've seen. Don't mean to sound elitist or rude in saying this, but learning a programming language isn't like learning how to use an addon where you can make a how-to video that explains all you'd ever need to know. It took me about 6 months of casual lua programming before I felt completely comfortable with it.
0
0
EDIT: Will add my support to the wow forums thread.
0
Thanks, knew I must have just missed it.
0
0
0
If POST requests aren't supported for creating tickets, any tips as to how I could accomplish this would be greatly appreciated. My website scripting experience is very limited.
Thanks
0
EDIT: I guess I could set the scale of the top level frame to zero. Anybody see any issues with doing this?
EDIT2: Guess you can't set a frame's scale to 0, and when I tried 0.0001, it still had a height of 1 which looks kind of weird. I guess I could hide that height of 1 frame behind the AH frame and hope nobody notices...
EDIT3: Ok I feel silly now. It turns out :SetAlpha does automatically propagate down to children...so nevermind this thread :)
0
Anyways, here's my question. Some users have addons that make their auction frame transparent, which makes my frame look ugly hiding behind the auction frame. I'm wondering what the best way around this would be. Is there a way to make a frame and all it's children opaque without having to iterate through everything? I've also considered moving my frame off the screen instead of having it hide behind the auction house, but I'm not sure that'd be a good idea.
Thanks
PS: Oh hey this is my 100th post, I feel special :cool:
0
0
Basically it doesn't matter where you call loadstring from, it will always use the global environment (assuming you don't mess with setting the environment or anything) rather than taking into account the environment from which the function is called. That's why your "Question A" and "Question B" code both returned nil.
PS: A simple implementation of assert if your curious what it does:
It's useful for loadstring because if the string you are trying to load into a function causes a complier error, loadstring will return nil as the first value and an error message as the second. Doing loadstring inside an assert will cause any errors to go to the default error handler (ie show up in wow) rather than it just being a silent failure.
0
0
0
Keep in mind that this is a hobby and not a job so you really have to be motivated to contribute. I am looking for people who have a solid programming background (lua / wow addon background would be great). If you use this addons that's obviously a plus, but certainly not a requirement. While this is a volunteer project, I have been known to be generous with curse reward points 8).
If you are interested or have any questions, please contact me in IRC (tradeskillmaster.wikispaces.com/IRC).
Thanks for reading.
0
For example:
instead of:
If you use something like the first table above, the dropdown will be in the same order as your table which you can easily control.
EDIT: sorry upon more reading I noticed you're trying to use that 2nd argument to the API, which I have no experience with. So, my answer may or may not be useful.
0
Not exactly a video but more a guide than anything else I've seen. Don't mean to sound elitist or rude in saying this, but learning a programming language isn't like learning how to use an addon where you can make a how-to video that explains all you'd ever need to know. It took me about 6 months of casual lua programming before I felt completely comfortable with it.