View Single Post
01-22-10, 02:02 PM   #60
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,935
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.
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818