Ok, I'm rather new to digging into Blizard's code, BUT I downloaded the bliz interface and rooted through staticPopup.lua
Starting to see where they changed things, and it does kind of seem easiest lightest weight to change the accepted thing.. only problem I worry about is that the same kind of code is used for accept/declines of a lot of other things that could be REALLY dangerous if Bliz allowed them to be modified in this way. I'm thinking of the COD functions, the DISBAND GUILD, PROMOTE, etc, etc... Sooner or later, might they not protect the heck out of thsee?
Am I going off in the wrong direction here, or are these possible concerns?
First of all, thanks for updating wowwiki - I had updated that AcceptGroup() page earlier and once I worked out the issues here, I went back and started updating the example ... then realized you had beat me to it. I rolled back my edits and posted a comment in the talk page apologizing for the unintentional "edit war"
Second of all, I actually LIKE the idea that you would see the dialog for a little bit too... I mean, the reason I put the feature in my addon was so I could easily group my toons up together while multi boxing. I just needed something that would accept my request and get the dialog out of the way, not completely change the way wow works.
I'm going to test your solution and if it works nicely, I may just replace the current fix.
Still, my addon is working and updated, and I used Borlox's fix (with attribution) to help out another multiboxer addon (I say another, but really it's THE BIG multiboxer addon), Jamba because the author is away on holiday and can't fix and test his addon til he gets back in May.
I've said it before and Ill say it again, I love the developer community.
I did indeed go with Borlox's code (even put thanks in change notes and in source code to him and Dridzt) and published as 0.3.02.
However, the idea about registering/unregistering sounds interesting.
Thus far I have pretty much relied on existing API documentation... I get the impression that the first place I should look is where? the Blizzard-generated addons?
First of all, thanks for the example fix.
I have a question though, if I unregister event, is that only local to my app or am I changing the way it works for all other addons? My assumption is it's only local, but I really want to be sure I understand what I'm doing.
I've got a feature to auto accept group invites in my MultiTool addon if certain conditions are met...
function MultiTool:confirmPartyInvite(info, sender)
if (self.db.profile.groupRejectFlag and not self:isInWhiteList(sender)) then
elseif (self.db.profile.groupFlag and self:isInWhiteList(sender)) then
My problem is that it looks as though the call to StaticPopup_Hide("PARTY_INVITE") is happening so soon after AcceptGroup() that AcceptGroup() ends up getting overridden by the popup hide.
I can put in some kind of delay, or otherwise change the way the code works and probably get it working, but I wanted to post here in case either someone else already figured it out, or else to let folks know that it appears there was some undocumented (as far as I can see) change in the way the StaticPopup_Hide("PARTY_INVITE") is being handled.