View Single Post
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/