Thread Tools Display Modes
04-28-14, 01:58 PM   #1
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
BasicUI

So I've been having a lot of issue with [ADDON_ACTION_BLOCKED] errors, I think its mostly do to my Datapanel and were its placed (below the actionbars), which in turns makes me need to lift them up and I believe this is what is messing with stuff.

So I'm trying something new....

Below are screen shots of the new location for the datapanel/datatexts tell me what you think if you like it or not... Ill post a before and after screenshot for those that have not seen it yet.


Coke
Attached Thumbnails
Click image for larger version

Name:	Before.png
Views:	542
Size:	356.0 KB
ID:	8070  Click image for larger version

Name:	After.png
Views:	392
Size:	306.1 KB
ID:	8071  Click image for larger version

Name:	After 2.png
Views:	367
Size:	299.1 KB
ID:	8072  

Last edited by cokedrivers : 04-28-14 at 02:39 PM.
  Reply With Quote
04-28-14, 02:32 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by cokedrivers View Post
So I've been having a lot of issue with [ADDON_ACTION_BLOCKED] errors, I think its mostly do to my Datapanel and were its placed (below the actionbars), which in turns makes me need to lift them up and I believe this is what is messing with stuff.
You may want to look at LibJostle to see how it handles doing this without breaking things.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-28-14, 08:42 PM   #3
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
You may want to look at LibJostle to see how it handles doing this without breaking things.
Ok you are a life saver seriously. No moving anything now all I needed to do was add the LibJostle and then change my code to:
Code:
function Datatext:SetDataPanel()

	if db.location ~= "top" then
		Datapanel:SetPoint("BOTTOM", UIParent, 0, 0)
		Datapanel:SetWidth(1200)
		if jostle then
			jostle:RegisterBottom(Datapanel)
		end		
	else 		
		Datapanel:SetPoint("TOP", UIParent, 0, 0)
		Datapanel:SetWidth(SCREEN_WIDTH)
		if jostle then
			jostle:RegisterTop(Datapanel)
		end
	end
end
EDIT:
And BAM!!!!!!!!!!! everything moves without any problems. Top or Bottom.

Thanks again for saving my arse.
/EDIT

EDIT#2:
Not sure why, im not getting any errors from bug sack but my target frame keep wondering over above my Playerframe (see screenshot) it only seems to happen after I get in combat (as something attacks me).

LibJostle-3.0 that I'm using.
Datatext.lua this is the current datatext file im using.

The only think I change was added the LibJostle to my addon and the little code.

If I disable the datatex in the options it does not move my target frame.

Coke

Edit#3
Its accually the Lib it self cause even without my datapanel the target frame moves over the player frame.
Coke

Last edited by cokedrivers : 04-28-14 at 10:13 PM.
  Reply With Quote
04-29-14, 07:08 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just right-click on the target frame, unlock it, and move it where you want it to go. I don't think Jostle was ever updated to handle the movable default unitframes, so just don't tell it to move stuff away from the top. Move the unit frames yourself (or write code to simulate moving them yourself) and move the minimap yourself since that's trivial.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-29-14, 10:03 PM   #5
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
Just right-click on the target frame, unlock it, and move it where you want it to go. I don't think Jostle was ever updated to handle the movable default unitframes, so just don't tell it to move stuff away from the top. Move the unit frames yourself (or write code to simulate moving them yourself) and move the minimap yourself since that's trivial.
I was able to fix my issue by marking out the frames I didn't want Jostle to move in the lib file itself.

Code:
local blizzardFrames = {
	--'PlayerFrame',
	--'TargetFrame',
	--'MinimapCluster',
	--'PartyMemberFrame1',
	--'TicketStatusFrame',
	--'WorldStateAlwaysUpFrame',
	'MainMenuBar',
	'MultiBarRight',
	--'CT_PlayerFrame_Drag',
	--'CT_TargetFrame_Drag',
	--'Gypsy_PlayerFrameCapsule',
	--'Gypsy_TargetFrameCapsule',
	--'ConsolidatedBuffs',
	--'BuffFrame',
	--'DEFAULT_CHAT_FRAME',
	--'ChatFrame2',
	--'GroupLootFrame1',
	--'TutorialFrameParent',
	--'FramerateLabel',
	--'DurabilityFrame',
	--'CastingBarFrame',
}
I tired to just shorten the code myself and only do the bottom functions (beings the option for my datatext to be on top now is gone) but all kinds of thinks started to happen.

Thanks again for the suggestion.
Coke
  Reply With Quote
04-30-14, 01:12 PM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by cokedrivers View Post
I was able to fix my issue by marking out the frames I didn't want Jostle to move in the lib file itself.
That's not a good solution, as if the user has any other addons installed that use the same lib, your modified version may get overwritten, or may overwrite the other version, and either way will result in one addon not getting the functionality it expects. If you don't want Jostle to move the frames at the top of the screen, just don't call the RegisterTop method to tell it to move frames at the top of the screen.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
04-30-14, 02:37 PM   #7
cokedrivers
A Rage Talon Dragon Guard
 
cokedrivers's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 325
Originally Posted by Phanx View Post
That's not a good solution, as if the user has any other addons installed that use the same lib, your modified version may get overwritten, or may overwrite the other version, and either way will result in one addon not getting the functionality it expects. If you don't want Jostle to move the frames at the top of the screen, just don't call the RegisterTop method to tell it to move frames at the top of the screen.
Well then I'm probably going to have to find another solution or see if some of the code I can figure out and add to my add-on. Because even when I disable my datatext module it still moves my target frame over my player frame. So in that aspect if some has this lib used for something else then it will still move the frame. I think it might have something to do with the scaling of the frame but as you know I m not a Luna programmer just a guesser.

Thanks for the heads up.

Coke
  Reply With Quote
04-30-14, 03:35 PM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I just looked through the Jostle code, and the solution to the "problem" is exactly what I already theorized it would be -- Jostle does not attempt to move frames that are flagged as user-placed, so if you move the player and target frames yourself, Jostle will not touch them.

To do it manually, right-click the frame, select the unlock option in the menu, drag the frame to the desired location, right-click again, and select the lock option in the menu.

To do it programmatically, call the same methods that are ultimately called when you perform the above actions:

Code:
TargetFrame:SetUserPlaced(true)
TargetFrame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 250, -4)
For compatibility reasons I'd suggest sticking with the TOPLEFT point, and just adjusting the x/y offsets. The offsets listed above are the default ones. If you don't already know the offsets you want, use the manual method to put the frame where you want it, then use this command to see where it is:

Code:
/dump tostringall(TargetFrame:GetPoint(1))
If you don't actually want to move the frame anywhere, just calling SetUserPlaced on it is probably enough.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 04-30-14 at 03:44 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » UI Screenshots, Feedback and Design Discussion » BasicUI

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