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

Extra units support for :Tag() #241

Closed
wants to merge 3 commits into from
Closed

Extra units support for :Tag() #241

wants to merge 3 commits into from

Conversation

p3lim
Copy link
Member

@p3lim p3lim commented Nov 26, 2014

This PR contains the following changes:

  • 582d8df Minor change to avoid doing the same check twice
  • 2ffcfbc This commit allows the layout to specify additional units which the event handler can match against. This is to make sure you could get an update for a tag on one unit for a different unit. As an example; I have my pet's health on my player frame, as I don't see a point of having a whole frame for it. With this I can tag like this: frame:Tag(fs, '[pethp][othertag]', 'pet') instead of forcing UNIT_HEALTH_FREQUENT or other events to be "unitless" with oUF.Tags.SharedEvents

@haste
Copy link
Member

haste commented Nov 27, 2014

I still feel that the second commit is an unnecessary complication for a very special use case.

You want to avoid having to create a frame (or custom tag function), by creating a new table on every single tag. That kinda defeats the point.

@p3lim
Copy link
Member Author

p3lim commented Nov 27, 2014

I could add a check to only create the table when extra units are supplied, and change the check in the event handler to reflect that.

An alternate solution would be to allow overriding parts of the tags element (like in every other element), for example, letting the layout replace the event handler with a custom one instead of having to rewrite the entire element.

@p3lim
Copy link
Member Author

p3lim commented Feb 28, 2017

Should be fine to merge, I've been using this myself for 2+ years without any issues.

p3lim added a commit that referenced this pull request Jun 9, 2018
p3lim added a commit that referenced this pull request Jun 9, 2018
p3lim added a commit that referenced this pull request Jun 9, 2018
@ls- ls- closed this Jun 15, 2018
Rainrider pushed a commit that referenced this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants