Go Back   WowAce Forums > General > Lua Code Discussion
Lua Code Discussion You scared? Terrified. Mortified. Petrified. Stupefied... by [coding].

Reply
 
Thread Tools
Old 03-25-2012   #1
dpsgnome
Junior Member
 
dpsgnome's Avatar
 
Join Date: May 2006
Posts: 84
Lightbulb How to reduce chance of UI taint from StaticPopupDialogs

Original discussion: http://www.tukui.org/forums/topic.php?id=15823


Basically, when you create a StaticPopupDialog table, set the following member like this:
Code:
StaticPopupDialogs["MY_DIALOG_NAME"]={
  preferredIndex = 3
  -- and then the rest of your definition
}
Basically, there are a total of 4 StaticPopupDialogs resources. 1 and 2 are the ones normally getting used by the Blizzard UI. If you "prefer" #3 (may end up in #4 if #3 is already showing), chances are much better to avoid tainting UI code that involves StaticPopupDialogs (notably the glyph UI)


Alternatively, you may want to use Torhal's http://www.wowace.com/addons/libdialog-1-0/ which always avoids taint, and extends the dialogs with a bit more functionality.


And, no, this does not solve all tainting issues. There's plenty more to go around. But it plugs one hole.
__________________
Yes. I'm actually Mikk. The curse user DB has mixed this old account up with my new one. Over 5 years now! It's awesome.
dpsgnome is offline   Reply With Quote
Old 03-25-2012   #2
funkydude
Administrator
 
funkydude's Avatar
 
Join Date: Nov 2005
Location: Scotland, UK
Posts: 3,000
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

Awesome, thanks for the heads up Mikk!
funkydude is offline   Reply With Quote
Old 03-25-2012   #3
Dridzt
Hero Member
 
Dridzt's Avatar
 
Join Date: Nov 2005
Posts: 874
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

That's basically what Rabbit said more than a year ago...
Dridzt is offline   Reply With Quote
Old 03-25-2012   #4
Elsia
Legendary Member
 
Join Date: Dec 2005
Posts: 2,144
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

A recount ticket? Neat.
Elsia is offline   Reply With Quote
Old 03-25-2012   #5
dpsgnome
Junior Member
 
dpsgnome's Avatar
 
Join Date: May 2006
Posts: 84
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

Yes, the glyph frame can un-taint itself somehow.

Basically, if you have the glyph frame open, and hit N+N to close it, and then open it again, it's tainted.

But if you [Esc] out of the glyph frame, and then open it again, it untaints itself.


Obviously just N+N doesn't automagically taint the frame, the taint has to come from somehwere. We haven't quite figured it out yet.

My personal guess is that timed popups (like Summon Accept + EPGP's "don't have multiple people change stuff!") is involved. Foxlit & Sylv were being suspicious about popups that read the .data / .data2 members, like loot & instance save accept dialogs.
__________________
Yes. I'm actually Mikk. The curse user DB has mixed this old account up with my new one. Over 5 years now! It's awesome.
dpsgnome is offline   Reply With Quote
Old 03-25-2012   #6
dpsgnome
Junior Member
 
dpsgnome's Avatar
 
Join Date: May 2006
Posts: 84
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

Uh. Except now it happened straight on startup with no popups involved.

Edit: Nailed it. Receiving a whisper causes this strain of taint for me.
__________________
Yes. I'm actually Mikk. The curse user DB has mixed this old account up with my new one. Over 5 years now! It's awesome.

Last edited by dpsgnome; 03-25-2012 at 02:23 PM.
dpsgnome is offline   Reply With Quote
Old 01-10-2013   #7
Carsight
Newbie
 
Join Date: May 2010
Posts: 2
Default TalentUI taint from using StaticPopup

Recently a huge amount of talent taints are occured, now here is the problem:

whoever calls 'StaticPopup_Show' when PlayerTalentFrame is hidden will cause this taint, you can try it

Even this macro will cause the taint when PlayerTalentFrame is hidden "/run StaticPopup_Show('PARTY_INVITE',"a")" , and make you have to reload ui when you want to change your talent

so, all addons author, don't use blizzard's StaticPopup systeam and try to use others
Carsight is offline   Reply With Quote
Old 01-10-2013   #8
8tImER
Member
 
8tImER's Avatar
 
Join Date: Mar 2005
Location: Baden-Baden, Germany
Posts: 28
Send a message via ICQ to 8tImER Send a message via MSN to 8tImER Send a message via Skype™ to 8tImER
Default Re: How to reduce chance of UI taint from StaticPopupDialogs

Necro!


At least since 5.0, probably even before that, it's better to use

preferredIndex=STATICPOPUPS_NUMDIALOGS

than 3. STATICPOPUPS_NUMDIALOGS is 4, currently.
__________________
Be nice to nerds, chances are you might end up working for one. -- Charles J. Sykes
0x0000000000051417, 0x000000000024737C, 0x00000000008EEEC5 :(, 0x0000000001C3F99F
8tImER is offline   Reply With Quote
Old 01-11-2013   #9
Carsight
Newbie
 
Join Date: May 2010
Posts: 2
Default Re: TalentUI taint from using StaticPopup

Yes, i know this thread, but since macro "/run StaticPopup_Show('PARTY_INVITE',"a")" will also taint, it's not the 'preferredIndex' who taint it, we just need to avoid using blz's staticpopup systeam
even /run StaticPopup4.which = '1' will taint talentUI

Last edited by Carsight; 01-11-2013 at 03:20 AM.
Carsight is offline   Reply With Quote
Reply

Tags
taint, tainting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:39 PM.