Thread Tools Display Modes
Unread 01-21-10, 09:44 AM   #41
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 350
Originally Posted by Xrystal View Post
Ah, thats not the problem Scott.
The code at present isn't as a plugin but it doesn't work properly if nUI is active. Without nUI it is doing exactly what I want it to do. All I can think of is that the little bit of control that nUI has over the watchframe is messing it up somewhere. So I was wondering if there was a programmatic way I can tell nUI to forget it knows about the watchframe so that my addon will work but in case people change their mind about the addon nUI can recontrol the watchframe as before.

In particular in non nUI you can drag the frame anywhere on the screen and it only changes the display when right at the bottom of the screen as it realises it cannot display all of tracked item 3 due to space limitations. However in nUI that happens when the frame is dragged down only as far as the dashboard.

But then again, it is possible once I infopanel frame it, it won't have that problem. Hmm, yes, think I'll try that later on when I get back from my job searching tasks.
<3 Xrystal

What sorta job you looking for and in what area? I have a few contacts across the US I can maybe give you info on.
__________________

Marth



Marthisdil is offline  
Unread 01-21-10, 12:00 PM   #42
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Rofl, well Im in the UK so that wouldn't work rofl. Although once my fiance gets his act together and gets filling in that immigration paperwork hopefully at some point in the *near* future I'll be looking for work there. Near seems to be lasting for the last 4 years rofl.
__________________
Xrystal is offline  
Unread 01-21-10, 12:23 PM   #43
Chmee
A Molten Giant
Join Date: Dec 2006
Posts: 960
Originally Posted by Xrystal View Post
Rofl, if I wore that type of outfit it would be tight .. and not a good sight .. rofl. And even if I was 'fit' to wear it I wouldn't rofl. Heck, even when I had my numerous swimming lessons as youngster I never wore a bikini rofl.
You had lessons? My mother just threw me in the deep end of the pool.
Chmee is offline  
Unread 01-21-10, 12:31 PM   #44
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Originally Posted by Chmee View Post
You had lessons? My mother just threw me in the deep end of the pool.
rofl, even funnier is that I still can't swim. Think the near drowning at the seaside when I was very little has made me subconciously scared of large expanses of water. Hmm,,, thats why I like Colorado so much
__________________
Xrystal is offline  
Unread 01-21-10, 12:40 PM   #45
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Well this helped somewhat. It still doesn't want to hide the watchframe completely in my window though for some reason but at least it is scrolling through the list. Although the scrolling still needs work. Rofl.

If you notice in one of the screenshots the frame has been moved to the bottom of the screen. Instead of keeping the contents as they were it has moved down the list being tracked as if the frame is just a window of the real frame that is static.

Oh well, I'm sure I'll get there eventually rofl.

Originally Posted by spiel2001 View Post
Ah -- okay -- there are two things that are at play there -- in the [ Interface > AddOns > nUI > Integration > nUI_Minimap.lua ] file (if memory serves me correctly -- I'm at work and can't look) there's a function at the bottom of the file called ResetWatch() or something to that effect. You could stub that function out in your plugin by replacing it with an empty function in your own code.

So if my function is

nUI.ResetWatch = function()

do this;
do that;

end

you would declare the same thing in your plugin...

nUI.ResetWatch = function()
end

That would prevent nUI from modifying the object frame itself (size, location, etc.). The other thing you would have to do is to unlock the frame using the nUI_Movers function. I believe the appropriate place for that would be in the plugin's init method.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_012110_183525.jpg
Views:	546
Size:	384.0 KB
ID:	3870  Click image for larger version

Name:	WoWScrnShot_012110_183433.jpg
Views:	542
Size:	385.6 KB
ID:	3871  Click image for larger version

Name:	WoWScrnShot_012110_183428.jpg
Views:	544
Size:	383.6 KB
ID:	3872  
__________________
Xrystal is offline  
Unread 01-22-10, 07:44 AM   #46
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Okay, incorporated the almost working scrollable quest watch frame into the infopanel system but unfortunately it isn't working the way I had planned.

As you can see it still is refusing to confine its display to the container frame but instead just doesn't display the text until the container frame is moved over it.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_012210_134201.jpg
Views:	553
Size:	309.9 KB
ID:	3879  Click image for larger version

Name:	WoWScrnShot_012210_134816.jpg
Views:	551
Size:	367.3 KB
ID:	3880  
__________________

Last edited by Xrystal : 01-22-10 at 07:49 AM.
Xrystal is offline  
Unread 01-22-10, 08:09 AM   #47
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
The first of those two images looks basically right to me except that the top is cut off... I can't tell if that's because it's not scrolled all the way up, or if the top of the objective frame is higher than the top of the container.

If it's the latter, then how are you anchoring the quest frame to the scroll frame? It should have the top left anchored to the top left.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 08:38 AM   #48
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Thats what I can't figure out.

I am anchoring the TOPLEFT to TOPLEFT and so it should show the top of the quest tracker as I haven't scrolled it at all. However, it seems to think that it is at the end which you can see is caused by the fact that despite parenting the watchframe to the scrollchild it isn't restricting the display. Moving the frame around as you can see from the 2nd screenshot will just highlight the elements of the list that would appear at that position as if the bottom of the watchframe is anchored to the bottom of the UIParent. Changing the value of the WatchFrame height affects how far down the screen it shows but it defeats the object of being able to have it as long as you like, just visibly showing what the frame has been told to show.

However, without nUI it doesn't seem to do that, although there are some other things that are not working right that aren't a problem with nUI. Go figure.
__________________
Xrystal is offline  
Unread 01-22-10, 08:51 AM   #49
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
okay, here are some more screenshots of the frame without the infopanel system. I moved the frame around without scrolling so that you can see the effect moving has. Instead of keeping the top of the list on display, which should be the case if I haven't scrolled anything, it decides to show me another part of the list.

I thought at first that resetting the WatchFrame on moving but that would defeat the object of the scrolling as it would just reset it to the top everytime.
Attached Thumbnails
Click image for larger version

Name:	WoWScrnShot_012210_144522.jpg
Views:	555
Size:	273.5 KB
ID:	3881  Click image for larger version

Name:	WoWScrnShot_012210_144527.jpg
Views:	544
Size:	274.4 KB
ID:	3882  Click image for larger version

Name:	WoWScrnShot_012210_144539.jpg
Views:	565
Size:	274.6 KB
ID:	3883  Click image for larger version

Name:	WoWScrnShot_012210_144542.jpg
Views:	554
Size:	272.3 KB
ID:	3884  

__________________
Xrystal is offline  
Unread 01-22-10, 10:00 AM   #50
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Have you unlocked the quest frame using the nUI_Movers method call *before* you try to re-anchor it?? Otherwise, it's not anchoring the way you think it is.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 10:12 AM   #51
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Yep. And generally the code is identical but I have been fiddling with both so now theyre out of synch again. So I'm gonna go and re-synch them, double check the results in game then post, both lua files ( without the infopanel attachment lua ). In essence they should work identically but it seems theyre not. I'll get back to you shortly.
__________________
Xrystal is offline  
Unread 01-22-10, 10:38 AM   #52
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Aha, interesting. The problem I still get without nUI loaded is that it tries to scroll past the end of the list of tracked items ( I assume to get to the bottom of the watchframe ) but the list itself doesn't move, but the scrollbox does. And then, because this isn't working right it then goes and disconnects the watchframe from the moveable scrollframe and until I scroll back to the last tracked item it acts like the nUI added version.

Edit: Another problem is when it reaches the bottom of the screen it decides to all of a sudden reset its positioning to the top of the list. But this could be due to the running out of space and the watchframe running some other code to arrange what gets displayed... hmm... wonder if there are other functions being called. Will have to look into that.

Edit2: Ah, testing with and without nUI and the problems are similar, just happens in different ways. In essence it forgets somewhere that it doesn't belong to UIParent. So, it sounds like under certain circumstances it is reparenting back until I do something to get its attention back again. Will take a look at what watchframe.lua does again in case there are some more events and functions that are triggering the reset and tell it to reset mine at the same time. May have to store current position in scrolling list if that is the case so that it is unnoticeable.

Here's the code anyway. It should work with or without nUI as I am testing for it before using the nUI commands.

Code:
local ObjectivesBackdrop = {                         
	bgFile = "Interface/Tooltips/UI-Tooltip-Background", 
    edgeFile = "Interface/Tooltips/UI-Tooltip-Border", 
    tile = true, 
    tileSize = 16, 
    edgeSize = 16, 
    insets = { left = 4, right = 4, top = 4, bottom = 4 }
};                       

local ObjectivesBackcolor = { 
   	red=0,green=0,blue=0,alpha=1 
};

local ObjectivesBordercolor = { 
  	red=255,green=255,blue=0,alpha=1 
}; 

local WatchFrameScrollFrame;
local nUI_Loaded = false;

local function ResetWatchFrame(parent)
	
	if ( nUI_Loaded ) then
		nUI_Movers:lockFrame( WatchFrame, false, nil ); -- OBJECTIVES_TRACKER_LABEL );
		nUI_Options.movedWatchFrame = true;
	end

	WatchFrame.moving = true;
	WatchFrame.sizing = true;
	
	WatchFrame:SetMovable( true );
	WatchFrame:SetResizable( true );
	WatchFrame:StartMoving();
	WatchFrame:StartSizing( "TOPLEFT" );
	
	WatchFrame:ClearAllPoints();
	WatchFrame:SetParent(parent);
	WatchFrame:SetHeight( 500 );
	WatchFrame:SetWidth( parent:GetWidth() );
	WatchFrame:SetPoint( "TOPLEFT", parent, "TOPLEFT", 30,-10 );
	WatchFrame:SetPoint( "TOPRIGHT", parent, "TOPRIGHT", -35, -10);

	WatchFrame.moving = nil;
	WatchFrame.sizing = nil;

	WATCHFRAME_IGNORECURSOR = "1";			
	WATCHFRAME_LASTWIDTH    = WatchFrame:GetWidth() ;
	
	WatchFrame:StopMovingOrSizing();
	WatchFrame:SetUserPlaced( true );
	WatchFrame_Expand( WatchFrame );

	if ( nUI_Loaded ) then
		nUI_Movers:lockFrame( WatchFrame, true, nil );
	end
end

-- Frame is moving
local function OnMouseDown(self)
	if ( ( not self.isLocked ) or ( self.isLocked == 0 ) ) then
        self:StartMoving();
        self.isMoving = true;
	end
end

-- Frame has stopped moving
local function OnMouseUp(self)
	if ( self.isMoving ) then
		self:StopMovingOrSizing();
		self.isMoving = false;
	end
end

-- Frame has been hidden
local function OnHide(self)
	if ( self.isMoving ) then
		self:StopMovingOrSizing();
		self.isMoving = false;
	end
end

local function CreateScrollFrame()
	
	local f = CreateFrame( "Frame", "WatchFrame_Container",UIParent);
	f:SetWidth(400);
	f:SetHeight(200);
	f:SetClampedToScreen(true);
	f:SetFrameStrata("HIGH");
	f:SetPoint("CENTER",UIParent,"CENTER",0,0);
	f:SetBackdrop(ObjectivesBackdrop);
	f:SetBackdropColor(ObjectivesBackcolor.red,ObjectivesBackcolor.green,ObjectivesBackcolor.blue, ObjectivesBackcolor.alpha);
	f:SetBackdropBorderColor(ObjectivesBordercolor.red, ObjectivesBordercolor.green,ObjectivesBordercolor.blue, ObjectivesBordercolor.alpha);
	f:RegisterForDrag("LeftButton");
	f:EnableMouse(true);
	f:SetMovable(true);
	f:SetScript("OnMouseDown",OnMouseDown);
	f:SetScript("OnMouseUp",OnMouseUp);
	f:SetScript("OnHide",OnHide);

	local s = CreateFrame( "ScrollFrame", "WatchFrame_ScrollFrame", f, "UIPanelScrollFrameTemplate" );
	s:SetPoint("TOPLEFT", 5, -5);
	s:SetPoint("BOTTOMRIGHT", -30, 5);
	f.Scroll = s;
	
	local c = CreateFrame("Frame","WatchFrame_ScrollChild",s);
	s:SetScrollChild(c);
	c:SetWidth(2);
	c:SetHeight(2);
	c:SetAllPoints(s);
	f.Child = c;
		
	return f;
end

local plugin    = CreateFrame( "Frame", "Mini_ObjectiveFrame", UIParent );

local function onEvent()
	if event == "VARIABLES_LOADED" then		
		WatchFrameScrollFrame = CreateScrollFrame();
		ResetWatchFrame(WatchFrameScrollFrame.Child);
		if ( nUI_Loaded ) then
			nUI_ResetWatchFrame = function() end;
		end
		WatchFrame.ClearAllPoints = function() end
		WatchFrame.SetPoint = function() end
		WatchFrame.SetAllPoints = function() end		
	elseif event == "ADDON_LOADED" then
		nUI_Loaded = false;
		if ( arg1 == "nUI" ) then
			nUI_Loaded = true;
			plugin:UnregisterEvent( "ADDON_LOADED" );
		end
	end	
end
plugin:SetScript( "OnEvent", onEvent );
plugin:RegisterEvent( "VARIABLES_LOADED" );
plugin:RegisterEvent( "ADDON_LOADED" );
__________________

Last edited by Xrystal : 01-22-10 at 11:05 AM.
Xrystal is offline  
Unread 01-22-10, 11:26 AM   #53
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
The first thing that jumps out at me is you are setting the size of the scroll child frame (s) to 2x2 and then using that to parent the watch frame... which sets its width to the scroll child width... which is 2.

I would suggest that WatchFrame should *be* the scroll child, actually.

I would unlock the WatchFrame as the first thing I do in setting all of this up. Then I would *not* lock it back down again.

So, in CreateScrollFrame I would...

Unlock the watch frame
Create the container frame
Create the scroll frame
Set the watch frame as the scroll child
Reset the watch frame

done
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 11:31 AM   #54
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
I did try that way and it worked worse than it is now but I'll try it again. The width on the scroll child gets altered later as it gets filled out to be the same size as the parent frame.
__________________
Xrystal is offline  
Unread 01-22-10, 11:36 AM   #55
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
If you want, you can ZIP up your plugin in whatever state it is in when you stop tonight (it's, what, 5:30 your time, right?) and e-mail it to me at kscottpiel@nuiaddon.com and I'll look at it either tonight or tomorrow morning and see if I can get it working.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 11:43 AM   #56
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
Okay, the good news is it seems to be working consistently with the following code changed regardless as to whether nUI is loaded or not. However, it still is adamant about sitting in the background as if it is still owned by UIParent.

Thanks for that Scott. I'm gonna spend some time reading through WatchFrame again and see if it is trying to do something else with it based on an event and see if I can trap it happening and stop it. The rest of the code is the same as before.

Code:
local function CreateScrollFrame()
	
	if ( nUI_Loaded ) then
		nUI_Movers:lockFrame( WatchFrame, false, nil ); -- OBJECTIVES_TRACKER_LABEL );
	end

	local f = CreateFrame( "Frame", "WatchFrame_Container",UIParent);
	f:SetWidth(400);
	f:SetHeight(200);
	f:SetClampedToScreen(true);
	f:SetFrameStrata("HIGH");
	f:SetPoint("CENTER",UIParent,"CENTER",0,0);
	f:SetBackdrop(ObjectivesBackdrop);
	f:SetBackdropColor(ObjectivesBackcolor.red,ObjectivesBackcolor.green,ObjectivesBackcolor.blue, ObjectivesBackcolor.alpha);
	f:SetBackdropBorderColor(ObjectivesBordercolor.red, ObjectivesBordercolor.green,ObjectivesBordercolor.blue, ObjectivesBordercolor.alpha);
	f:RegisterForDrag("LeftButton");
	f:EnableMouse(true);
	f:SetMovable(true);
	f:SetScript("OnMouseDown",OnMouseDown);
	f:SetScript("OnMouseUp",OnMouseUp);
	f:SetScript("OnHide",OnHide);

	local s = CreateFrame( "ScrollFrame", "WatchFrame_ScrollFrame", f, "UIPanelScrollFrameTemplate" );
	s:SetPoint("TOPLEFT", 5, -5);
	s:SetPoint("BOTTOMRIGHT", -30, 5);
	f.Scroll = s;
	
	s:SetScrollChild(WatchFrame);
	f.Child = WatchFrame;
	ResetWatchFrame(s);
	
	if ( nUI_Loaded ) then
		nUI_ResetWatchFrame = function() end;
	end
	WatchFrame.ClearAllPoints = function() end
	WatchFrame.SetPoint = function() end
	WatchFrame.SetAllPoints = function() end		

	--[[
	local c = CreateFrame("Frame","WatchFrame_ScrollChild",s);
	s:SetScrollChild(c);
	c:SetWidth(2);
	c:SetHeight(2);
	c:SetAllPoints(s);
	f.Child = c;
	--]]
		
	return f;
end

local plugin    = CreateFrame( "Frame", "Mini_ObjectiveFrame", UIParent );

local function onEvent()
	if event == "VARIABLES_LOADED" then		
		WatchFrameScrollFrame = CreateScrollFrame();
		--ResetWatchFrame(WatchFrameScrollFrame.Child);
	elseif event == "ADDON_LOADED" then
		nUI_Loaded = false;
		if ( arg1 == "nUI" ) then
			nUI_Loaded = true;
			plugin:UnregisterEvent( "ADDON_LOADED" );
		end
	end	
end
__________________
Xrystal is offline  
Unread 01-22-10, 11:59 AM   #57
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
One thing I see is this...

Code:
     if ( nUI_Loaded ) then
        nUI_ResetWatchFrame = function() end;
    end
I would recommend that you actually move that outside of all of your functions and lose the test... it won't hurt anything to do it if nUI isn't loaded. The problem is your "Create" method doesn't get called until the VARIABLES_LOADED event fires at which point nUI has already taken control of the WatchFrame.

Just put this at the top of your source file...

Code:
nUI_ResetWatchFrame = function() end;
If nUI isn't loaded, it hurts nothing. If it is loaded, and you have marked your addon as dependent on nUI, your code won't load until nUI's code has already been loaded, but *before* it is executed, in which case your function will replace nUI's function and keep it from being executed and thus keep nUI from fiddling with the watch frame.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 12:08 PM   #58
Marthisdil
An Onyxian Warder
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 350
Originally Posted by spiel2001 View Post
One thing I see is this...

Code:
     if ( nUI_Loaded ) then
        nUI_ResetWatchFrame = function() end;
    end
I would recommend that you actually move that outside of all of your functions and lose the test... it won't hurt anything to do it if nUI isn't loaded. The problem is your "Create" method doesn't get called until the VARIABLES_LOADED event fires at which point nUI has already taken control of the WatchFrame.

Just put this at the top of your source file...

Code:
nUI_ResetWatchFrame = function() end;
If nUI isn't loaded, it hurts nothing. If it is loaded, and you have marked your addon as dependent on nUI, your code won't load until nUI's code has already been loaded, but *before* it is executed, in which case your function will replace nUI's function and keep it from being executed and thus keep nUI from fiddling with the watch frame.
If nothing else, I'm learning a lil bit about frames and lua here

I <3 you guys!
__________________

Marth



Marthisdil is offline  
Unread 01-22-10, 12:23 PM   #59
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
FYI -- I moved this from plugin support to developer chat since it's really more code/design/testing centric than actual support for a plugin.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
spiel2001 is offline  
Unread 01-22-10, 02:02 PM   #60
Xrystal
nUI User and Supporter
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,030
I've already mailed you the copy of the files at its best functionality so far but I did just try this suggestion and if I place that code with or without the test above all my functions the scrolling stops working completely. Only where it is currently does the scrolling work.

Ah, nUI loads up after my addon does and so it replaces my fake function with its real one. Okay, after some debugging it looks like the earliest spot I can put it is when ADDON_LOADED for nUI is actioned. At that point the function has been defined and I negate it. Clearing it before its created gets ignored as it creates it when nUI is loaded anyway.

Ah, sudden burst of inspiration, if my addon is loaded before nUI ( the non infopanel version anyway as it seems to be alphabetical ), perhaps if I store the WatchFrame values before nUI changes them then restore them afterwards then do what I want. Although I doubt that will work as the same problem occurs without nUI installed now so will come back to this idea when I am left with nUI being loaded as a problem and see if that resolves it.

Originally Posted by spiel2001 View Post
One thing I see is this...

Code:
     if ( nUI_Loaded ) then
        nUI_ResetWatchFrame = function() end;
    end
I would recommend that you actually move that outside of all of your functions and lose the test... it won't hurt anything to do it if nUI isn't loaded. The problem is your "Create" method doesn't get called until the VARIABLES_LOADED event fires at which point nUI has already taken control of the WatchFrame.

Just put this at the top of your source file...

Code:
nUI_ResetWatchFrame = function() end;
If nUI isn't loaded, it hurts nothing. If it is loaded, and you have marked your addon as dependent on nUI, your code won't load until nUI's code has already been loaded, but *before* it is executed, in which case your function will replace nUI's function and keep it from being executed and thus keep nUI from fiddling with the watch frame.
__________________
Xrystal is offline  
 

Go BackWoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Customization » nUI: Developer Chat » Quest Tracker Info Panel

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