Thread Tools Display Modes
12-12-08, 11:02 PM   #101
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Alkar View Post
Started gettin this today any reason why??

[2008/12/12 19:53:41-216-x1]: oUF-1.2.1\elements\tags.lua:131: bad argument #1 to 'gmatch' (string expected, got nil)
oUF-1.2.1\elements\tags.lua:131: in function `func'
oUF-1.2.1\ouf.lua:232: in function <Interface\AddOns\oUF\ouf.lua:187>
oUF-1.2.1\ouf.lua:250: in function <Interface\AddOns\oUF\ouf.lua:247>
oUF-1.2.1\ouf.lua:304: in function `Spawn'
oUF_Deith\test.lua:301: in main chunk
You haven't set a tag string on a fontstring you've told oUF should contain one.
 
12-13-08, 01:55 AM   #102
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Adventuress layout authors should give the git version of oUF a try.

* Elements are handled slightly different, and they can be disabled. This is largely untested.
* The event system has been changed. It should still work without updating the layout, but it's considered good practice to do: object:RegisterEvent('EVENT', func) and object:UnregisterEvent('EVENT', func). The reason for doing this is because: object:RegisterEvent('EVENT', func1) object:RegisterEvent('EVENT', func2) will convert the event into a double call.
* Tags have been rewritten. They should be quite bit more CPU and memory friendly.
* Quite a lot of bug fixes (mostly to the castbar).
* .Name has been removed, as tags are up to par.
* .Auras is no longer blocking .Buff and .Debuffs.

Now, I want to get this version out as soon as possible. Which means you have until Monday to test it. I won't have access to WoW until then, and I've only had time to do some minor testing myself.

It's also a great time to do feature requests!

Do note that there is a severe lack of internal validation and documentation on events/elements/tags atm. It's pretty easy to get some unintended behavior without having oUF erroring. :)

Don't be afraid to report bugs. Large quantities of the code is drycoded, and not tested at all. So in many cases it will probably be oUF giving an error and not your layout.

As a side note: You don't have to file a bug report on wowi for the git version. Contacting me over PM or IRC works just fine. I will also try to maintain a BUGS file on git, so that you can easily check what's reported and not. The reason for this is that the wowi bug/feature system has too many issues itself, and it looks like they will stand unresolved until the new portal system is up. Which means that this will be the preferred solutions until: a) the wowi system gets an update b) I finish my own issue tracker c) I switch it over to gcode.
 
12-13-08, 04:21 AM   #103
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
I use tags with my layout but I've one question: I have a previous version of oUF because tags were easy to implement: only self.TaggedStrings{ourstrings} but now how do we tell oUF that a fontstring contain tags.
I looked at tags.lua but I'm not good enought to understand everything so I can't find where oUF registers tagged strings.

That code was pretty easy to understand and told oUF was easy to.
Code:
table.insert(oUF.subTypes, function(self, unit)
	if self.TaggedStrings then
		for i,fs in pairs(self.TaggedStrings) do
			local parent = fs:GetParent()
			local tagstring = fs:GetText()

			local f = CreateFrame("Frame", nil, parent)
			f:SetScript("OnEvent", OnEvent)
			f:SetScript("OnShow", OnShow)
			f.tagstring, f.fontstring, f.parent = tagstring, fs, self

			-- Register any update events we need
			for tag in string.gmatch(tagstring, "[[][%w]+[]]") do
				local tagevents = events[tag]
				if tagevents then
					for event in string.gmatch(tagevents, "%S+") do
						f:RegisterEvent(event)
					end
				end
			end
			if unit == "target" then f:RegisterEvent("PLAYER_TARGET_CHANGED") end
			if unit == "focus" then f:RegisterEvent("PLAYER_FOCUS_CHANGED") end

			OnShow(f)
		end
	end
end)
Actually if someone can told me how to tell oUF that a fontstring contains tags I'll test the new layout.
__________________
 
12-13-08, 02:30 PM   #104
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
It's still pretty straight forward:

Code:
self:Tag(fontstring, '[tagtext]')
 
12-13-08, 02:33 PM   #105
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
Originally Posted by haste View Post
It's still pretty straight forward:

Code:
self:Tag(fontstring, '[tagtext]')
Oh so easy

Thanks

Edit: tested but it doesn't work maybe I did something wrong

Code:
self:Tag(Powertext,'|cffffffff[perpp]|r')
Is the syntax wrong or is this just a bug?
__________________

Last edited by Soeters : 12-13-08 at 03:02 PM.
 
12-14-08, 07:42 AM   #106
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Haste, will the new :RegisterEvent() and :UnregisterEvent() apply to subobjects?
 
12-14-08, 07:44 AM   #107
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Soeters View Post
Oh so easy

Thanks

Edit: tested but it doesn't work maybe I did something wrong

Code:
self:Tag(Powertext,'|cffffffff[perpp]|r')
Is the syntax wrong or is this just a bug?
You didn't post an error, but it was probably related to what dafire reported on IRC a couple of minutes ago. There's a fix for that on git now.

Originally Posted by p3lim View Post
Haste, will the new :RegisterEvent() and :UnregisterEvent() apply to subobjects?
Depends on what you mean with sub-objects.
 
12-14-08, 07:45 AM   #108
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by haste View Post
Depends on what you mean with sub-objects.
self.Power:RegisterEvent('EVENT', func)

Although it might not be needed.
 
12-14-08, 07:50 AM   #109
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No, the event system is only set on the oUF objects. I did think about applying it to all elements that could use events, but it's not worth the overhead. Neither I am really sure of when you would want to register events upon a element, instead of oUF itself.
 
12-14-08, 07:57 AM   #110
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by haste View Post
No, the event system is only set on the oUF objects. I did think about applying it to all elements that could use events, but it's not worth the overhead. Neither I am really sure of when you would want to register events upon a element, instead of oUF itself.
Just read that you can register multiple functions to the same event with :RegisterEvent('EVENT', func), so it wont be nessisary for the sub-object one.
Can easily do this for my druidpower function now.

Code:
self:RegisterEvent('UNIT_MANA', DruidPowerFunc)
self:RegisterEvent('UNIT_ENERGY', DruidPowerFunc)
self:RegisterEvent('PLAYER_LOGIN', DruidPowerFunc)
Right?

Last edited by p3lim : 12-14-08 at 08:00 AM. Reason: wrong objects in code
 
12-14-08, 08:01 AM   #111
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
No, your self.DruidPower will still have the old event system. It's only set on oUF objects which means "self" in most cases.
 
12-14-08, 08:02 AM   #112
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by haste View Post
No, your self.DruidPower will still have the old event system. It's only set on oUF objects which means "self" in most cases.
Edited the above post
 
12-14-08, 08:11 AM   #113
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Yes that will work.
 
12-14-08, 10:58 AM   #114
Mordog
A Deviate Faerie Dragon
Join Date: Feb 2008
Posts: 17
I tested oUf with the Pelims Layout today.
works great and i like the look^^.

got only one little problem.
Im using Clique for healspells. Now Clique reacts to every ouf frame and i cant tell it to ignore ouf, because i dont now the framenames.
Tried to get them with "/script DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName());", but that doesnt work.

Can someone tell me the names of the frames (player, target, pet, focus and tt) so i can try to add same manually to the ignorelist in clique?
 
12-14-08, 11:20 AM   #115
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Mordog View Post
I tested oUf with the Pelims Layout today.
works great and i like the look^^.

got only one little problem.
Im using Clique for healspells. Now Clique reacts to every ouf frame and i cant tell it to ignore ouf, because i dont now the framenames.
Tried to get them with "/script DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName());", but that doesnt work.

Can someone tell me the names of the frames (player, target, pet, focus and tt) so i can try to add same manually to the ignorelist in clique?

Unless they are named in the spawn, they also have global names.

e.g.
oUF.units.player
oUF.units.party1
oUF.units.targettarget

and so on..
 
12-14-08, 11:26 AM   #116
Mordog
A Deviate Faerie Dragon
Join Date: Feb 2008
Posts: 17
thank you for the fast replay
 
12-14-08, 11:28 AM   #117
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Mordog View Post
thank you for the fast replay
You welcome, mail subscriptions ftw
 
12-14-08, 12:17 PM   #118
Mordog
A Deviate Faerie Dragon
Join Date: Feb 2008
Posts: 17
Originally Posted by p3lim View Post
Unless they are named in the spawn, they also have global names.

e.g.
oUF.units.player
oUF.units.party1
oUF.units.targettarget

and so on..
Didnt work for me in the savedvariables of cligue.

So looked for a way to name the frames and added e.g. oUF:Spawn('player', "oUF_Player") to your code after looking at some other layoutcodes. (hope you dont mind )
works perfect.

Just two more questions. ' and " are the same, right? And what does 'header' do?

Thx for the help
 
12-14-08, 12:24 PM   #119
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by Mordog View Post
Didnt work for me in the savedvariables of cligue.

So looked for a way to name the frames and added e.g. oUF:Spawn('player', "oUF_Player") to your code after looking at some other layoutcodes. (hope you dont mind )
works perfect.

Just two more questions. ' and " are the same, right? And what does 'header' do?

Thx for the help
header is a special oUF unit which is used to spawn group headers. These will create raid/party frames depending on the settings they have.

Single and double quotes are the same.
 
12-14-08, 12:39 PM   #120
Mordog
A Deviate Faerie Dragon
Join Date: Feb 2008
Posts: 17
Thanks again

Now I will stop to mess up the thread
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - General discussion

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