Closed Thread
 
Thread Tools Display Modes
Old 12-24-08, 04:27 AM   #161
grimman
A Fallenroot Satyr
 
grimman's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 28
Originally Posted by Blood Druid View Post
Thanks Haste, the answer settling that it was required to understand

by the way are a new problem:
with vehicle, if in combat to quit from vehicle that units do not vary back, i.e. "player" remains "pet"

as it to correct?
self.disallowVehicleSwap = true

This will stop the vehicle/player swapping. It may not be the solution you're looking for, but until what you described has been fixed (if it is indeed a bug) this may be your only option. I never took the time to check it out in-depth, because I don't even want vehicle swapping in my layout.
grimman is offline  
Old 12-24-08, 05:04 AM   #162
Blood Druid
A Fallenroot Satyr
Join Date: Oct 2008
Posts: 26
Originally Posted by grimman View Post
self.disallowVehicleSwap = true
Yes I saw this parameter, it simply switch, it not that that is necessary for me.
The idea of a vehicle made Haste is pleasant to me, but it would be necessary to finish it...
Blood Druid is offline  
Old 12-24-08, 06:46 AM   #163
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by Blood Druid View Post
by the way are a new problem:
with vehicle, if in combat to quit from vehicle that units do not vary back, i.e. "player" remains "pet"

as it to correct?
No, that's a bug. I haven't had time to look at it yet however .
haste is offline  
Old 12-26-08, 04:27 AM   #164
saulhudson
A Deviate Faerie Dragon
 
saulhudson's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 10
Originally Posted by Celil View Post
with the update today (1.3.1) i got this errormessage every time if something changes in the UnitFrames (e.g. joining party, hp-loss, etc):

oUF\ouf.lua:94: attempt to call field '?' (a nil vlaue)

Anyone an idea where this bug come?
I've updated to 1.3.1 and I'm getting this error also and I've been trying for hours to get rid of it but nothing seems to be working. For me it is only happening during raids and when im solo or party its fine.

!BugGrabber is my only way of stopping the error and it doesnt seem to cause any other ill affects so I was hoping the print error trap that P3lim suggested would work but when I add that code the unit frames just dont show at all and I get the default UI frames for some reason.

Can someone please tell me how I can go about fixing this in laymans terms as I've read this thread back to front and still am no clearer on how to fix it. I know you guys (haste, p3lim etc) are rolling your eyes thinking "what a noob go work it out yourself" but I wouldn't be asking for help if I didnt need it so please explain the problem, whats happening and how I fix it.

oUF is a brilliant unit frame but sadly everytime it updates my Unit Frames just start erroring and there is little in the way of documentation etc telling me what I should do and the changes to the code I should be making.

Thanks

Last edited by saulhudson : 12-26-08 at 04:30 AM.
saulhudson is offline  
Old 12-26-08, 04:43 AM   #165
Mordog
A Deviate Faerie Dragon
Join Date: Feb 2008
Posts: 17
You have to change oUF and not the Layout.

Open oUF.lua and search for

Code:
-- Events
local OnEvent = function(self, event, ...)
	if(not self:IsShown() and not self.__unit) then return end
	self[event](self, event, ...)
end
change it to

Code:
-- Events
local OnEvent = function(self, event, ...)
	if(not self:IsShown() and not self.__unit) then return end
	if (self[event]) then
  self[event](self, event, ...)
else
  print(string.format('Object %s (%s) attempted to call event [%s], which has no handler.', tostring(self), tostring(self.unit), even))
end
end
That should fix the error
Mordog is offline  
Old 12-26-08, 08:14 AM   #166
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by saulhudson View Post
<text />
Most of the errors people see is because they update oUF before the layouts have been updated. This is probably due to there being a lot of confusion about layout compatibility between oUF releases.

The current versioning scheme is: a.b.c, and the current version is 1.3.1.
a - major version - this will probably never change, unless the entire layout system is replaced with something else.
b - minor version - acts as an indicator of what changes have been made to the API. This is changed when I make an internal change which will break with current layouts.
c - maintenance version - bug fixes made to the core, which are backward compatible with previous versions.

Based on this we've basically had three versions which have broken layouts since August 2008. In most cases it might not seem that a lot has happened on the back-end, but here's the diff stats between every minor version:
Code:
1.0 -> 1.1 (1146 lines diff)
 elements/aura.lua      |  109 +++++++++++++++++++---
 elements/castbar.lua   |  236 ++++++++++++++++++++++++++++++++++++++++++++++++
 elements/cpoints.lua   |   18 +++-
 elements/happiness.lua |   35 +++++---
 elements/health.lua    |  115 ++++++++++++++++--------
 elements/power.lua     |  131 +++++++++++++++++++++------
 elements/pvp.lua       |   26 ++++--
 elements/range.lua     |   11 ++-
 oUF.toc                |    3 +-
 ouf.lua                |  147 +++++++++++++++++++-----------
 10 files changed, 671 insertions(+), 160 deletions(-)

1.1 -> 1.2 (1301 lines diff)
 elements/aura.lua      |   16 ++++-
 elements/castbar.lua   |  180 +++++++++++++++++++++++++------------------
 elements/cpoints.lua   |    5 +
 elements/happiness.lua |   12 +++-
 elements/health.lua    |   39 +++++++--
 elements/leader.lua    |   14 +++-
 elements/portraits.lua |    5 +
 elements/power.lua     |   45 ++++++++---
 elements/pvp.lua       |    5 +
 elements/range.lua     |    6 +-
 elements/ricons.lua    |   12 +++-
 elements/status.lua    |    5 +
 elements/tags.lua      |  199 ++++++++++++++++++++++++++++++++++++++++++++++++
 elements/threat.lua    |   44 +++++++++++
 oUF.toc                |   18 +----
 oUF.xml                |   37 +++++++++
 ouf.lua                |  170 +++++++++++++++++++++++++----------------
 17 files changed, 630 insertions(+), 182 deletions(-)

1.2 -> 1.3 (2016 lines diff)
 elements/aura.lua      |  178 +++++++++++++------------------
 elements/castbar.lua   |  149 +++++++++++++++++++-------
 elements/cpoints.lua   |   34 +++---
 elements/happiness.lua |   25 +++--
 elements/health.lua    |   48 ++++++---
 elements/leader.lua    |   23 +++-
 elements/portraits.lua |   24 +++--
 elements/power.lua     |   93 +++++++++--------
 elements/pvp.lua       |   25 +++--
 elements/range.lua     |    6 +-
 elements/ricons.lua    |   20 +++-
 elements/status.lua    |   66 ++++++++----
 elements/tags.lua      |  274 ++++++++++++++++++++++++++++-------------------
 elements/threat.lua    |   30 ++++--
 elements/vehicle.lua   |   83 +++++++++++++++
 oUF.toc                |    4 +-
 oUF.xml                |    1 +
 ouf.lua                |  197 +++++++++++++++++++++--------------
 18 files changed, 796 insertions(+), 484 deletions(-)
It was probably especially bad with this release, as the event system and element system got a complete rewrite, while mostly maintaining "compatibility" with previous versions. In many cases you could just use oUF 1.3.x on a 1.2.x layout, without getting any errors, at least at first.

My guess is that many of the layout authors just have done some minor testing, and thought "hey, this works! *release*". The line 94 error that most people have at is an indicator of this being the case. It happens because people just registered events, assuming that the event handlers would always be in the oUF table. In 1.2 and earlier the elements just forced themselves into the core table, and acted as a event fallback for all oUF objects, while in 1.3 they are hidden away until registered on a object.

I wanted to get some error checking in before I made the 1.3 release, but in the end I had to make a choice between releasing 1.3 as is, or delaying it yet another week. I announced on the forum that I wanted to have it released by the 15th December, but that was delayed until 21st due to time restrictions.

Making a 1.2 layout work on 1.3 is quite easy in most cases actually. You can take a look at what changes I did on my layouts:
Classic:
http://ixo.no/git/oUF_Classic.git/co...62c98037a266e9
http://ixo.no/git/oUF_Classic.git/co...be91394ca9d272
http://ixo.no/git/oUF_Classic.git/co...9e39165a22b55c

Lily:
http://ixo.no/git/oUF_Lily.git/commi...faad45af8f74a9
http://ixo.no/git/oUF_Lily.git/commi...4dba74bac17ea5
http://ixo.no/git/oUF_Lily.git/commi...4e55397c071dae
http://ixo.no/git/oUF_Lily.git/commi...bc451794e6be28

Originally Posted by Mordog View Post
You have to change oUF and not the Layout.

Open oUF.lua and search for

Code:
-- Events
local OnEvent = function(self, event, ...)
	if(not self:IsShown() and not self.__unit) then return end
	self[event](self, event, ...)
end
change it to

Code:
-- Events
local OnEvent = function(self, event, ...)
	if(not self:IsShown() and not self.__unit) then return end
	if (self[event]) then
  self[event](self, event, ...)
else
  print(string.format('Object %s (%s) attempted to call event [%s], which has no handler.', tostring(self), tostring(self.unit), even))
end
end
That should fix the error
That's not a fix at all. It will only print a error when a layout is doing something wrong.
haste is offline  
Old 12-27-08, 05:00 AM   #167
saulhudson
A Deviate Faerie Dragon
 
saulhudson's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 10
I need to say a big thankyou to Haste and Mordog for these responses both detailed and information so thank you guys!

Ok so problem is solved ... well not entirely but I'll explain.

When I put in the code with the print I got the error message pop up basically saying there is a problem with UNIT_AURA. Now these is a bit of redundant code I had in my layout which has never worked and I've never got round to fixing it. I had intended to use the oUF_DebuffHigh module and I had some code in my layout for it but it never worked as intended. This code was only in the raid frame and therefore only popped up when I got into a raid. So problem found thank the lord eh!

Hence 2 work arounds, one rip out all the code in my layout for Aura's and debuff hightling which isnt a bad thing as it doesn't work anyway or put in a handler for it which is what I did as when I get chance I'll still try and fix the debuffhighling. So I added the below line

Code:
self.UNIT_AURA = updateAura
Then created a dummy function

Code:
local updateAura = function(self, unit)

end
Not exactly the best solution going but problem solved non the less.

Other solution was to comment out this section of my layout ...

Code:
self.DebuffHighlight = self.Health:CreateTexture(nil, "OVERLAY")
self.DebuffHighlight:SetAllPoints(self.Health)
self.DebuffHighlight:SetTexture("Interface\\AddOns\\oUF_Saul\\textures\\highlight.tga")
self.DebuffHighlight:SetBlendMode("ADD")
self.DebuffHighlight:SetVertexColor(0, 0, 0, 0)
self.DebuffHighlightAlpha = 0.8
So I'll need to get my thinking cap on for the debuff highlighting but its christmas and tbh all I want to do is grind a few quest and have another mince pie!

Enjoy and many thanks for the help and advise it is very much appreciated!

Thanks
saulhudson is offline  
Old 12-27-08, 06:33 AM   #168
TÝra
A Murloc Raider
Join Date: Dec 2008
Posts: 6
i cant move the frame....
TÝra is offline  
Old 12-27-08, 07:55 AM   #169
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by saulhudson View Post
Other solution was to comment out this section of my layout ...

Code:
self.DebuffHighlight = self.Health:CreateTexture(nil, "OVERLAY")
self.DebuffHighlight:SetAllPoints(self.Health)
self.DebuffHighlight:SetTexture("Interface\\AddOns\\oUF_Saul\\textures\\highlight.tga")
self.DebuffHighlight:SetBlendMode("ADD")
self.DebuffHighlight:SetVertexColor(0, 0, 0, 0)
self.DebuffHighlightAlpha = 0.8
So I'll need to get my thinking cap on for the debuff highlighting but its christmas and tbh all I want to do is grind a few quest and have another mince pie!

Enjoy and many thanks for the help and advise it is very much appreciated!

Thanks
oUF Debuff Highlight makes some bad assumptions. I'll poke ammo about it.
haste is offline  
Old 12-27-08, 08:05 AM   #170
TÝra
A Murloc Raider
Join Date: Dec 2008
Posts: 6
i cant open the oUF menu to move the frame, please help me.
TÝra is offline  
Old 12-27-08, 08:08 AM   #171
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
There is no menu, unless the layout provides it. Your issue isn't related to the oUF core.
haste is offline  
Old 12-27-08, 08:12 AM   #172
TÝra
A Murloc Raider
Join Date: Dec 2008
Posts: 6
the layout are bottom and i cant move them.
is this general discussion right ?
TÝra is offline  
Old 12-27-08, 08:15 AM   #173
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by TÝra View Post
the layout are bottom and i cant move them.
is this general discussion right ?
It's the same answer anyway. Moving is done through the code for most layouts. Which means this is completely layout dependent. oUF itself doesn't and will not provide any in-game options because layouts can solve and modify behavior as they like.
haste is offline  
Old 12-27-08, 08:22 AM   #174
TÝra
A Murloc Raider
Join Date: Dec 2008
Posts: 6
how can i move the frame bottom the character ?

Last edited by TÝra : 12-27-08 at 09:02 AM.
TÝra is offline  
Old 12-27-08, 09:26 AM   #175
Kellen
A Deviate Faerie Dragon
Join Date: Mar 2008
Posts: 18
How do you hook using the new event structure? I suck pretty hard at this and was using the following in 1.2.1:

Code:
local orig_RAID_TARGET_UPDATE = self.RAID_TARGET_UPDATE
self.RAID_TARGET_UPDATE = function (self, event)
  orig_RAID_TARGET_UPDATE(self, event)
  PositionRaidIcon(self)
end
Kellen is offline  
Old 12-27-08, 11:14 AM   #176
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by Kellen View Post
How do you hook using the new event structure? I suck pretty hard at this and was using the following in 1.2.1:

Code:
local orig_RAID_TARGET_UPDATE = self.RAID_TARGET_UPDATE
self.RAID_TARGET_UPDATE = function (self, event)
  orig_RAID_TARGET_UPDATE(self, event)
  PositionRaidIcon(self)
end
There really isn't any straight forward way to hook with the new event system. You can however just register the event with a function parameter, and oUF will place it afterwards in the call rotation. It's just a post-hook however, nothing more.

Replacing the function isn't really recommended as oUF uses this to handle unregistering of events tho'.
haste is offline  
Old 12-27-08, 12:03 PM   #177
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 268
I recieved this for the very first time a minute ago in nax

Code:
Interface\AddOns\oUF\elements\castbar.lua:180: Usage: <unnamed>:SetValue(value)
Count: 1

Call Stack:
[C]: ?
[C]: in function `SetValue'
Interface\AddOns\oUF\elements\castbar.lua:180: in function `?'
Interface\AddOns\oUF\ouf.lua:94: in function <Interface\AddOns\oUF\ouf.lua:92>
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Caellian is offline  
Old 12-27-08, 12:16 PM   #178
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by Caellian View Post
I recieved this for the very first time a minute ago in nax

Code:
Interface\AddOns\oUF\elements\castbar.lua:180: Usage: <unnamed>:SetValue(value)
Count: 1

Call Stack:
[C]: ?
[C]: in function `SetValue'
Interface\AddOns\oUF\elements\castbar.lua:180: in function `?'
Interface\AddOns\oUF\ouf.lua:94: in function <Interface\AddOns\oUF\ouf.lua:92>
It's a known issue actually, even if it doesn't have a bug entry .
haste is offline  
Old 12-27-08, 01:34 PM   #179
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 196
I still have a problem with Vehicles,

Sometime my frame stays in the "Pet" frame after exiting.

Same with my Party the show as pets on radom ocasions?
Quokka is offline  
Old 12-27-08, 01:43 PM   #180
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 979
Originally Posted by Quokka View Post
I still have a problem with Vehicles,

Sometime my frame stays in the "Pet" frame after exiting.

Same with my Party the show as pets on radom ocasions?
Known issue.
haste is offline  
Closed Thread

Go BackWoWInterface » 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