Thread Tools Display Modes
06-10-08, 02:31 AM   #1
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
fixed bongos petbar and DUF tooltip error

hello.

long time user of this ui which i found quite impressive and usefull.
been working for some time rewriting discord mods for 2.4 yes bars are nearly complete to so i wanted to share the work i done on duf to get it error free.

the petbar problem in bongos was actually pretty easy to fix minor typo in CreateFrame was setiing the parent to nil so it newer updated works now tho

anywhere i can upload the files to ?

regards beefcan
  Reply With Quote
06-10-08, 04:08 AM   #2
Eas
A Rage Talon Dragon Guard
 
Eas's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2007
Posts: 311
should just have a chat with Doc and he'll fix everything for the next pack update. as long as the next update dosent bring mazzle to Bongos3
  Reply With Quote
06-10-08, 10:07 AM   #3
DocEVL
A Cobalt Mageweaver
 
DocEVL's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 232
Originally Posted by beefcan View Post
hello.

long time user of this ui which i found quite impressive and usefull.
been working for some time rewriting discord mods for 2.4 yes bars are nearly complete to so i wanted to share the work i done on duf to get it error free.

the petbar problem in bongos was actually pretty easy to fix minor typo in CreateFrame was setiing the parent to nil so it newer updated works now tho

anywhere i can upload the files to ?

regards beefcan
Yes please contact me in IM and we can talk.
  Reply With Quote
06-10-08, 11:45 AM   #4
Lewter
A Murloc Raider
Join Date: May 2008
Posts: 6
Originally Posted by beefcan View Post
hello.

long time user of this ui which i found quite impressive and usefull.
been working for some time rewriting discord mods for 2.4 yes bars are nearly complete to so i wanted to share the work i done on duf to get it error free.

the petbar problem in bongos was actually pretty easy to fix minor typo in CreateFrame was setiing the parent to nil so it newer updated works now tho

anywhere i can upload the files to ?

regards beefcan
What was the fix fo the bongos petbar?
  Reply With Quote
06-10-08, 05:46 PM   #5
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
replace these two functions in bongos_actionbar\petBar\bar.lua

Code:
--[[ Startup ]]--

local function CreatePetWatcher(bar)
	--(beefcan) fixed petbar
	local driver = CreateFrame('Frame', nil, bar, 'SecureStateHeaderTemplate')
	driver:SetParent(bar)
	driver:SetAttribute('unit', 'pet')	
	RegisterUnitWatch(driver)
	return driver
end

BProfile.AddStartup(function()
	local bar = BBar.Create("pet", "BPetBar", "BActionSets.pet", ShowMenu)
	if not bar.driver then
		bar.driver = CreatePetWatcher(bar)
		if not UnitExists('pet') then
			bar.driver:Hide()
		else
			bar.driver:Show()
		end
	end
	if not bar:IsUserPlaced() then
		bar:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 528)
	end
	local petBar = PetActionBarFrame
	petBar:SetScript("OnEvent", OnEvent)
	petBar:RegisterEvent("PLAYER_CONTROL_LOST")
	petBar:RegisterEvent("PLAYER_CONTROL_GAINED")
	petBar:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED")
	petBar:RegisterEvent("UNIT_PET")
	petBar:RegisterEvent("UNIT_FLAGS")
	petBar:RegisterEvent("UNIT_AURA")
	petBar:RegisterEvent("PET_BAR_UPDATE")
	petBar:RegisterEvent("PET_BAR_UPDATE_COOLDOWN")
	petBar:RegisterEvent("PET_BAR_SHOWGRID")
	petBar:RegisterEvent("PET_BAR_HIDEGRID")
	petBar:RegisterEvent("PET_BAR_HIDE")
	petBar:RegisterEvent("UPDATE_BINDINGS")

	Layout(bar, bar.sets.rows, bar.sets.space)
end)
and doc where can i get your im ?

regards beefcan
  Reply With Quote
06-10-08, 05:58 PM   #6
DocEVL
A Cobalt Mageweaver
 
DocEVL's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 232
Originally Posted by beefcan View Post
and doc where can i get your im ?
regards beefcan
You can click on my name then click send Private Message.

Anyways thanks for the code for petbar I will get that in the next Core release as bongos3 is taking more time than I hoped.
  Reply With Quote
06-10-08, 06:01 PM   #7
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
most welcome and i sent the fixed DUF to you as well.
  Reply With Quote
06-10-08, 06:03 PM   #8
Thoragh
A Cliff Giant
Join Date: Apr 2007
Posts: 78
Thanks for the fix.
  Reply With Quote
06-11-08, 06:51 AM   #9
Lewter
A Murloc Raider
Join Date: May 2008
Posts: 6
Thank you for the fix
  Reply With Quote
06-11-08, 09:41 AM   #10
RedbullVDK
A Deviate Faerie Dragon
Join Date: Nov 2007
Posts: 11
So i made all the changes and now all my bars are gone!!! If I show bags/menu/keys they show up on the bottom right hand corner. I double checked code and where i placed the code. I would guess that it shouldn't have effected my main bars. Am I the only one this has happened to?

I remazzified, disabled moveframes since it is causing issues else where and nothing brings the bar back.

when i just copy paste the code since its all the same it shows the bars but no pet bar shows. again the changes should be made in bongos_actionbar\petbar\bar.lua correct? to me it seams like a lot more changes then just a few typos.

if I copy my old file back in I get it all to come back, but of course that doesn't solve the issue.

HELP please.

thanks

Last edited by RedbullVDK : 06-11-08 at 09:58 AM.
  Reply With Quote
06-11-08, 12:23 PM   #11
DocEVL
A Cobalt Mageweaver
 
DocEVL's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 232
Originally Posted by RedbullVDK View Post
So i made all the changes and now all my bars are gone!!! If I show bags/menu/keys they show up on the bottom right hand corner. I double checked code and where i placed the code. I would guess that it shouldn't have effected my main bars. Am I the only one this has happened to?

I remazzified, disabled moveframes since it is causing issues else where and nothing brings the bar back.

when i just copy paste the code since its all the same it shows the bars but no pet bar shows. again the changes should be made in bongos_actionbar\petbar\bar.lua correct? to me it seams like a lot more changes then just a few typos.

if I copy my old file back in I get it all to come back, but of course that doesn't solve the issue.

HELP please.

thanks
Did you edit bongos/bongos_actionbar/petbar/bar.lua?
If you are having the problem you describe, I would guess you edited the wrong bar.lua file. Just a guess. I have put in the change and while I have not been able to test it yet, it does not cause problems with my existing bars.
  Reply With Quote
06-11-08, 03:18 PM   #12
RedbullVDK
A Deviate Faerie Dragon
Join Date: Nov 2007
Posts: 11
Yeah, I am sure i did the correct file. I ended up just cut and pasting it again and it didn't mess up the buttons that were there, but the pet bar still didn't work when I tried an mc with my priest.

my luck i'm prly the only one.

thanks
  Reply With Quote
06-11-08, 03:24 PM   #13
DocEVL
A Cobalt Mageweaver
 
DocEVL's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 232
Originally Posted by RedbullVDK View Post
Yeah, I am sure i did the correct file. I ended up just cut and pasting it again and it didn't mess up the buttons that were there, but the pet bar still didn't work when I tried an mc with my priest.

my luck i'm prly the only one.

thanks
It didn't work for my priest when I mind controlled either...

Last edited by DocEVL : 06-11-08 at 08:59 PM.
  Reply With Quote
06-11-08, 07:48 PM   #14
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
hmm strange but ok only tried it on chess and worked there dont have an spriest but ill see if i can figure it out.

thx for the bugreport.

i might mention if not a pet holding class the bar will pop just above your DUF portrait no idea why but i guess its because mazzleui doesnt set the user placing for chars that dont normally have a petbar.

looks like this on my shammy


Last edited by beefcan : 06-11-08 at 10:56 PM.
  Reply With Quote
06-11-08, 10:03 PM   #15
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
got a friend to test it and you where right it doesnt work atleast not on priest

scrap the previous code and tell me if this works it did on his priest.

Code:
-- some major hackery here this shouldnt be nessesary but unfortunatly it is sigh :(
-- atleast it works...
function SetFrameUnitWatch(frame, watch)
  if watch then
    RegisterUnitWatch(frame, false)
  else
    UnregisterUnitWatch(frame)
  end
end

local function CreatePetWatcher(parent)
	local driver = CreateFrame('Frame', nil, parent, 'SecureStateHeaderTemplate')
	SetFrameUnitWatch(driver, false)
	driver:SetAttribute('unit', 'pet')	
	SetFrameUnitWatch(driver, true)
	return driver
end

BProfile.AddStartup(function()
	local bar = BBar.Create("pet", "BPetBar", "BActionSets.pet", ShowMenu)	
	if not bar.driver then
		bar.driver = CreatePetWatcher(bar)		
		if not UnitExists('pet') then
			bar.driver:Hide()
		end
	end
	if not bar:IsUserPlaced() then
		bar:SetPoint("BOTTOM", UIParent, "BOTTOM", 0, 528)
	end	
	bar:SetScript("OnEvent", OnEvent)
	
	local petBar = PetActionBarFrame
	petBar:RegisterEvent("PLAYER_CONTROL_LOST")
	petBar:RegisterEvent("PLAYER_CONTROL_GAINED")
	petBar:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED")
	petBar:RegisterEvent("UNIT_PET")
	petBar:RegisterEvent("UNIT_FLAGS")
	petBar:RegisterEvent("UNIT_AURA")
	petBar:RegisterEvent("PET_BAR_UPDATE")
	petBar:RegisterEvent("PET_BAR_UPDATE_COOLDOWN")
	petBar:RegisterEvent("PET_BAR_SHOWGRID")
	petBar:RegisterEvent("PET_BAR_HIDEGRID")
	petBar:RegisterEvent("PET_BAR_HIDE")

	Layout(bar, bar.sets.rows, bar.sets.space)
end)
  Reply With Quote
06-12-08, 09:26 AM   #16
RedbullVDK
A Deviate Faerie Dragon
Join Date: Nov 2007
Posts: 11
so the question is is this deleting all of it or just the lower part?
  Reply With Quote
06-12-08, 09:38 AM   #17
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
safest would be to just replace all from the previous code.
  Reply With Quote
06-12-08, 09:52 AM   #18
RedbullVDK
A Deviate Faerie Dragon
Join Date: Nov 2007
Posts: 11
did that and so far so good my priest pet bar pops up when MC is done. Awesome!!! thanks
  Reply With Quote
06-12-08, 09:56 AM   #19
DocEVL
A Cobalt Mageweaver
 
DocEVL's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 232
Thanks I will give it a go and check it out.
__________________
"Imagine all the people living life in peace" - J. Lennon


  Reply With Quote
06-12-08, 05:07 PM   #20
beefcan
A Deviate Faerie Dragon
Join Date: Jun 2008
Posts: 19
your welcome

maybe a better method of doing it but so far as it works im happy

the function i actually lent from mudd's modified discord_unitframes
he gave a pretty good explanation with it as to why its nessesary to do it that way. basically its a blizzard problem but one that may newer be fixed
as all there secure frames depend on it.

what happens is that as a priest you enter combat as soon as you start to cast mindcontroll and frames cannot be modified in combat so the bar locks up before even showing.

a minor detail but not really nessesary is to put local in front of function SetFrameUnitWatch(frame, watch) so it looks like this local function SetFrameUnitWatch(frame, watch) i forgot that but it works without it
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » fixed bongos petbar and DUF tooltip error


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