Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid creating potentially unnecessary globals for the scanning tooltip #786

Open
rdw-software opened this issue Oct 26, 2024 · 0 comments

Comments

@rdw-software
Copy link
Member

Source: Discord (DM)

First time I've seen this when looking at _G, use devtool with, find __Rarity
image

Looking at the code, there's one global being created for the tooltip itself:

local scanTip = CreateFrame("GameTooltip", "__Rarity_ScanTip", nil, "GameTooltipTemplate")

The other globals appear to be indexed directly, one for each tooltip line. It's probably cleaner to store them locally, though?

Not sure why they're global. Maybe a limitation of Blizzard's UI? I'd try moving them into the GUI module to see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: The time is nigh (Planning)
Development

No branches or pull requests

1 participant