WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   OpenRDX: Bug/Error Reports (http://www.wowinterface.com/forums/forumdisplay.php?f=105)
-   -   [Github] Integration (http://www.wowinterface.com/forums/showthread.php?t=42966)

unlimit 03-05-12 06:31 AM

[Github] Integration
 
Below would be the corrected code for QuestKing, in Init and Close you were "return true;" instead of "return a;" which wasn't letting it load at all.

I suspect the same would apply to the Recount integration.

lua Code:
  1. RDXEvents:Bind("INIT_VARIABLES_LOADED", nil, function()
  2.    
  3.     if IsAddOnLoaded("QuestKing") then
  4.         RDXDK.RegisterWindowLess({
  5.             name = "desktop_questking",
  6.             Init = function(id)
  7.                 local a = QuestKing_Tracker;
  8.                 if a then a:Hide(); end
  9.                 return a;
  10.             end,
  11.             Open = function(id)
  12.                 local a = QuestKing_Tracker;
  13.                 if a then
  14.                     a:Show();
  15.                     return a;
  16.                 else
  17.                     return nil;
  18.                 end
  19.             end,
  20.             Close = function(id, frame)
  21.                 local a = QuestKing_Tracker;
  22.                 if a then a:Hide(); end
  23.                 return a;
  24.             end,
  25.             Description = "QuestKing",
  26.             Rebuild = function(id, frame)
  27.                 return true;
  28.             end,
  29.             Props = function(mnu, id, frame)
  30.                 table.insert(mnu, {
  31.                     text = VFLI.i18n("Rebuild"),
  32.                     OnClick = function()
  33.                         VFL.poptree:Release();
  34.                         local cls = RDXDK.GetWindowLess(frame._dk_name);
  35.                         if cls then
  36.                             cls.Rebuild(id, frame);
  37.                         end
  38.                     end
  39.                 });
  40.             end
  41.         });
  42.     end
  43. end);

sigg 03-10-12 04:18 AM

you don't need to return the frame in the init and Close option

Can you post a screenshot of the issue ?

Thanks


All times are GMT -6. The time now is 06:55 PM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC