I'm new to Lua, but by no means new to programming. I've come from a tradition of C, C++, and Java, where globals are severely frowned upon mostly due to multi-threading issues. As such, Java (and its successors like Groovy, Scala, Clojure, etc.) all severely limit your capability to create true globals.
I suppose if you're limited to such a tight namespace, global by default makes more sense. However, it has the potential to wreak havoc. For example, when I replaced the functions min() and max() with an integer value... um... oops!?
I've adjusted my expectations appropriately and now I'm stumbling towards my next "gotcha." Many thanks for the help.
- Registered User
Member for 12 years, 1 month, and 28 days
Last active Fri, Oct, 4 2013 14:32:22
- 0 Followers
- 21 Total Posts
- 0 Thanks
Jan 12, 2010That'd definitely do it. I'll need to re-read the scoping rules. Seems odd to me that code within a block would define variables in a global namespace instead of scoped to the block itself.Posted in: Lua Code Discussion
Jan 12, 2010Ah, my mistake. In the actual file, they are local. I removed the local thinking that it was possible that I misunderstood the scoping which led to some problem when the event fired.Posted in: Lua Code Discussion
In any case, the same error happens with or without the local.
Jan 12, 2010I'm cutting my teeth on WoW Addons and have run into a situation I don't understand.Posted in: Lua Code Discussion
function updateDisplay() MyFrame.obj.text = "Foo" end function handleLoginEvent(self, event, ...) if (event == "PLAYER_LOGIN") then updateDisplay() end end MyFrame:SetScript("OnEvent", handleLoginEvent)
Upon login, my label does get updated, but I'm then presented with a completely blank Lua error followed by 36 other Lua errors. Attempting to use any part of the stock UI is broken at this point. Open the paper doll throws errors, etc.
Oddly, if I replace the call to updateDisplay() with the update itself, there is no error. It seems that I've made a mistake somehow with the function call semantics, but I'm really not sure what.
A more detailed code listing is available at http://paste.wowace.com/1625/
Could someone help me figure out what I'm not getting right here?
Oct 29, 2007Posted in: General AddOnsQuote from Toadkiller »
I need more information here. Right now it is very fast so that for instance if you have popups set to the up or down direction then you can get rid of it by moving the mouse left or right of the current button & then move back to the obscured button.
[...] Could you elaborate some more?
Also popup on shift (or some other modifier key) is on the todo list.
First, let me say this is pretty low priority. Just something i think would be cool. I'm not even sure it's possible to do a delay of this sort within the plugin framework.
I would only want the delay on popup:show, but not on popup:hide. The idea is to have a very small delay (in the range of .1 or .2 seconds). Consider the following scenario:
You have your autobar on top of several other bars:
AAAAAA B2B2B2 B1B1B1
If you reach down to b2 with the mouse, autobar is triggered no matter how fast you move the mouse right now. This isn't a big deal, because it's not in the way, and it disappears when you reach the buttons you're looking for.
However, if you're going from B1 back out, you also trigger it, which means, you may hit an AutoBar button on the way back to trying to click something to target, etc.
Also consider the following. You have AutoBar configured for multiple rows/columns:
AR1C1 AR1C2 AR1C3
AR2C1 AR2C2 AR2C3
AR3C1 AR3C2 AR3C3
no matter which way you have the popups extend, the popups will always be in the way of some button without a short delay.
Obviously, should you pursue such a thing, it'd have to be optional and variable. i.e. .2 seconds may be sufficent for me, but too short for Bob. And you may hate it all together and choose to turn it off.
Popup on shift would be a good addition. It has a different purpose than this, though. You may want to set certain buttons to popup on shift. I.e. Trinkets. If you use a wardrober, you probably don't change trinkets much manually, but you do want whatever trinket is equipped to be usable in AB. If you did want to change a trinket, you would hold down shift. Makes sense here too because trinkets can't be changed in battle anyway.
However, healing items would be short delay, no shift. This way you could take both a healing potion and a healthstone during battle.
Oct 29, 2007I also would like the popup back. Too bloated? Did anyone complain about it?Posted in: FuBar AddOns
I guess it doesn't matter that much to me, until some future wow update breaks it, i'll just revert to a previous version and disable updates to it. I don't see much reason to have gotten rid of it though.
Oct 28, 2007Posted in: General AddOnsQuote from Toadkiller »
Meanwhile I will add Trinket1 & Trinket2 bindings in the next version.
Thank you. In the meantime, I appreciate you posting this workaround.
I don't even know if this is possible, but perhaps once things are stable, you could consider it. It'd be nice if a variable delay could be added to the popups. i.e. the popup won't appear until you've hovered over the button for .2 seconds. This would prevent a quick mouse mis-movement from opening a big menu over the button you're looking for.
Oct 28, 2007Posted in: General AddOnsQuote from Toadkiller »
Beta documentation: http://code.google.com/p/autobar/wiki/Beta
this seems to be a bug of some sort then. is there a debugging log i can turn on and submit to you to help with this? I've tried that, and there is no lua error on entry, but the trinket remains unbound.
Oct 28, 2007I still can't seem to figure out how to keybind the new (and wonderful) trinket 1 and trinket 2 buttons.Posted in: General AddOns
/script SetBinding("T","AutoBarButtonTrinket 1Frame")
/script SetBinding("T","AutoBarButtonCustomTrinket 1Frame")
But none of these have worked. What am I doing wrong here?
Oct 26, 2007Posted in: Unit FramesQuote from Rotcaster »
Sorry if the subject is poorly worded. I have my player and target frames located at the top center of my screen. The problem is when I'm in a zone with pvp objectives (silithist collected in Silithis, towers owned in Hellfire Peninsula, etc), the objective status is either hidden under my frames or on top of them. Is there a mod that will allow me to relocate the pvp stuff? Thanks!
Capping will allow you to move the scores, simpleminimap will allow you to move the little bar that shows progress. (those frames are actually tied to the map frame). There may be another simple mod that will do it, but until someone can answer better, those will do it.
Oct 26, 2007Posted in: Unit FramesQuote from d45 »
Cant believe none else noticed this :<
Can you do this with the default Blizzard UI? If you can, and you feel this is a bug, then reporting it to jira.wowace.com will allow the author to become aware of the problem and prioritize its correction.
Oct 17, 2007_ForgeUser1199237 posted a message on PitBull - How do I show Buffs, then Debuffs underneath?I've always wanted it to work like this:Posted in: Unit Frames
---------------- | | ---------------- BBBBBBBBDDDDDDDD
(which it does right now)
But when too many buffs or debuffs were on a target, it'd look like....
---------------- | | ---------------- BBBBBBBBDDDDDDDD BB DD
So they'd wrap onto the next line. Basically, instead of a "Max-Buff/Max-Debuff" option, it'd be "Max per line."
Oct 15, 2007Occasionally, an addon developer will either forget to include a dependancy in the TOC, or will have it named incorrectly (WindowLib is the dependancy and Window-1.0.lua is the file name, etc). They won't notice this error until someone points it out to them, because they tested it with embedded libraries. In these cases, using embedded libraries won't cause any errors. If you find an addon that looks like it might be doing this, open the <addon_name>.lua file and see if the library that is missing is listed. If it is, let the developer of that addon know, and hopefully they'll fix it.Posted in: Updaters
Oct 10, 2007Is it really possible to fight an arena team of the same faction from the same realm? I guess it could be possible... it hasn't happened to me yet, but I haven't done all that much arena.Posted in: Rock
If you were fighting same-faction folks from another realm, it still wouldn't be a problem though, as the communication is done over an addon channel, right? So... it wouldn't be the same addon channel for both groups, because your teams exist on differing realms.
My guess: Regardless of the disposition of this addon debate, if it is possible for same-faction/same-realm arena opponents to have addons that communicate with one-another (this would have to be tested, i'd be surprised if this is true) this issue will be hotfixed by Blizzard. That is clearly not an anticipated battle-group/arena behavior, and would be more of a server issue than any one addon. I think this holds true for the reasons stated above, it's just too easy for an addon writer to sneak things in that the users wouldn't know about. The whole point to the provided addon API that Blizzard has provided is to protect users from themselves... by not allowing addons to do anything that would be damaging to an end-user's data.
Oct 10, 2007Posted in: General AddOnsQuote from fred »
I read about the features of this mod, can something like this be added or would it be alot of coding?
Doesn't all of that info come with AucAdv anyway? If you have AucAdv installed (which is required by the linked addon) all you have to do is mouse-over the target to see anticipated materials cost, Auc valuation, vendor valuation, and of course, disenchant predictions and disenchant valuations.
I guess it shouldn't be too much more effort to add that info to the skillet window, but seems kinda cluttery.
- To post a comment, please login or register a new account.