Any performance wise differences between Header and Single spawning for a group?
Just wandering, Bliz's "CompactUnitFrame" is a single secure-unit-button and they build party/raid frames with it.
And we can build party/raid frame with a header spawning or some single spawnings but which is the better way? (Sorry for my bad English. Please let me know if my question is not clear one) |
You don't really need to wonder about this. Spawning party/raid frames through headers is the most valid solution for us. Consider the following:
- Using headers: We create one header which then creates up to N unit buttons depending on our header settings and number of existing units. - Using single spawn: We create N unit buttons depending on our setup, regardless of unit existence. Generally both oUF and CompactFrames have the same solution, but we're required to go through the secure API provided to actually create frames while in combat. (sent from my phone) |
Thanks for your reply, haste. I'll try to spawn them as a header with no worry. =)
Btw, I was going to spawn them as singles because I was failed to spawn party-target header. Code:
oUF:Factory(function (self) - These party-targets have not 'partytarget' as 'oUF-guessUnit' attribute. - It seems 'enableTargetUpdate' function not works correctly. Though 'OnShow' update works. (I mean when I have no target and then target someone, it's updated correctly. But when I chenge the target to the another one, it's not updated correctly) Anyway, I'm sure I need farther testing. I'll post again when I find something useful to share. |
You have to do this with xml. This is what I use for partypets and partytargets:
xml Code:
then just declare "template", "oUF_Party" within SpawnHeader for your party frames |
Thanks for your help, Rainrider. =)
I know, many layout uses xml and works fine. But for me, spawning by lua is easier way to control these frames after spawning. When I looked a thread, I thought it can be done by lua only ... but maybe I'm wrong. |
It doesn't really matter how you spawn them in terms of adressing them. You don't have to spawn them via xml - self:SetAttribute('unitsuffix', 'target')
- is another way, indeed. I think your "nil, nil, nil," is the problem, try "nil, nil, party,". |
Please let me know if this works for you. I tried to spawn partytargets, partypets and mttargets with lua and they get spawned but are never visible. Doing it with xml templates works just fine.
Btw nice catch Dawn but shouldn't the visibility option be a string (nil, nil, "party" instead of "nil, nil, party")? The first nil is supposed to be the frame name. What is the second for? Type of template to be used? |
I was just looking at it quickly and giving a hint, no "case-sensitiv-copy&paste ready" code. ;)
I personally spawn MT targets without xml, just fine. Code:
local MainTankTarget = self:SpawnHeader("oUF_MainTankTarget", nil, 'raid, party', |
https://github.com/haste/oUF/issues/74
I probably won't be able to take a proper look until Saturday or Friday. |
Also, health will update as long as you use frequentUpdates in the current version.
|
Hm, I managed to spawn MTT and party pets through headers. When I try to spawn party target though, I get this:
Quote:
lua Code:
So it's not me, it's just bugged? |
self.SpawnHeader( is not equal to self:SpawnHeader(
|
Ooooh maaaan. I definitely need an optician :( Everything works now, thank you very much for looking into it
|
Thanks haste, with latest git it works. :)
Now, I'm worry about having the units like 'playerpet' or 'playertarget' though. |
Should be solved on git.
|
Sorry about my useless report that was sent while you are still coding.
I'll test it as soon as I can. :) Edit: I overlooked the thread about git testing. :( Yes, the title of this thread makes no sense anymore. |
I pushed the fix due to you reporting it.
It's also better to report errors, even if you are uncertain why they are happening. I'd rather have too many error reports, than too few. |
All times are GMT -6. The time now is 04:05 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI