Thread Tools Display Modes
07-26-16, 12:17 PM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Lua mixin

Anyone have succeded to do this mixin xml function to work directly from lua?

I would like to create a similar statusbar to this one:
https://github.com/Resike/BlizzardIn...Frame.xml#L316

But no luck so far.
  Reply With Quote
07-26-16, 12:21 PM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Not sure what you're asking for exactly, but I'm pretty sure it simply is the equivalent of doing this:
Code:
for k, v in pairs(AnimatedHealthLossMixin) do
	frame[k] = v
end
__________________
Grab your sword and fight the Horde!
  Reply With Quote
07-26-16, 12:41 PM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Lombra View Post
Not sure what you're asking for exactly, but I'm pretty sure it simply is the equivalent of doing this:
Code:
for k, v in pairs(AnimatedHealthLossMixin) do
	frame[k] = v
end
Yes i've done that, i tought there would be something like :SetMixing(object) or something.
  Reply With Quote
07-26-16, 12:48 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
This is defined in SharedXML/Util.Lua:175.
Lua Code:
  1. function Mixin(object, ...)
  2.     for i = 1, select("#", ...) do
  3.         local mixin = select(i, ...);
  4.         for k, v in pairs(mixin) do
  5.             object[k] = v;
  6.         end
  7.     end
  8.  
  9.     return object;
  10. end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Lua mixin


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