Quantcast Problem in dropdown menu - WoWInterface
Thread Tools Display Modes
02-18-20, 10:30 PM   #1
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Problem in dropdown menu

Hi all,

I am looking some help to try to fix a problem in one of my addon:

gmFonts
https://www.wowinterface.com/downloa...4-gmFonts.html

It used a component by phanx to make the font selector:

PhanxConfig-Dropdown.lua
https://github.com/phanx-wow/PhanxCo...g-Dropdown.lua

But with the patch it was not unable to select the items anymore.

I have checked my code and I don't think it is a fault by it so a filled a iussue case to phanx to git but I sadly think she doesn't follow it anymore.

So I am here to ask if someone can help to debug it or is using it and has fixed or has alternative to it.

Thanks.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
02-19-20, 01:26 AM   #2
wardz
A Deviate Faerie Dragon
 
wardz's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 11
Had this issue earlier aswell, it's because CloseDropDownMenus() is now called every time you click something ingame so it closes the phanx dropdown before you get to actually click on any entries. I've submitted a pull request to PhanxConfig-Dropdown now that should fix it.
  Reply With Quote
02-19-20, 01:51 AM   #3
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,206
See also: https://us.forums.blizzard.com/en/wo...haviour/416933
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
02-19-20, 10:58 AM   #4
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Thanks so much for your help.

It works nicely if I put the unregister event in my addon:

Lua Code:
  1. local ADDON = ...
  2.  
  3. local size={}
  4. local prgname = "|cffffd200MyFonts|r"
  5. local string_format = string.format
  6.  
  7. local BUTTON_HEIGHT = 40
  8. local BUTTON_WIDTH = 150
  9.  
  10. local lsmfontsmenu
  11. local gmfontsmenu
  12.  
  13. UIParent:UnregisterEvent("GLOBAL_MOUSE_DOWN")
  14.  
  15. -- saved variables
  16. GMFONTS = GMFONTS or {}
  17.  
  18. blabla blabla


But what I get as side effect of this ?

May I break something else ?

Thanks.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
02-19-20, 01:02 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,206
It seems primarily to effect clearing a dropdown entry if it has autocomplete and you click in it.

Edit: It does some other things that also happen on GLOBAL_MOUSE_UP so unless someone moves the mouse off the field before releasing, it shouldn't be effected.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-19-20 at 02:01 PM.
  Reply With Quote
02-19-20, 05:08 PM   #6
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
I have implemented this in the options frame hoping not to break too many things.

When someone find the way to patch the phanx code please let me know and I remove this

In the meantime thanks so much to everyone for the help.
It is really appreciated help.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
02-19-20, 05:11 PM   #7
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Originally Posted by Fizzlemizz View Post
It seems primarily to effect clearing a dropdown entry if it has autocomplete and you click in it.

Edit: It does some other things that also happen on GLOBAL_MOUSE_UP so unless someone moves the mouse off the field before releasing, it shouldn't be effected.
Hi Fizzlemizz,

Do you think it should be better to:

Lua Code:
  1. UIParent:UnregisterEvent("GLOBAL_MOUSE_UP")

too ?

Thanks ...
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote
02-19-20, 05:38 PM   #8
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,206
There should not be any need to do that if you aren't seeing any ill effects (GLOBAL_MOUSE_UP also performs some of the tasks done by mouse down like hiding the dropbox so you would loose those if you unregistered it).
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 02-20-20 at 08:40 AM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Problem in dropdown menu

Thread Tools
Display Modes

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

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