• 0

    posted a message on Bartender4 - Official Topic
    Quote from gamingfossil
    to blizzard i say:
    I still think blizzard should offer nevcairiel a job. ;)

    qft.
    Posted in: General AddOns
  • 0

    posted a message on Noob question about OnEvent
    Thanks! I'll give that a try tonight.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Noob question about OnEvent
    Poking around has led me to one idea I'm not sure of. The docs I read say that RegisterEvent() needs to be associated with a frame, but I'm not sure if it is.

    The relevant frame is created in the .xml file as

      <!-- RecipeBook Hidden Frame -->
      <Frame name = "RecipeBookFrame" hidden = "true">
        <Scripts>
          <OnShow>
        if self.NextUpdate == 0    then
          self.NextUpdate = RECIPEBOOK_UPDATEFREQUENCY
        end;
          </OnShow>
          <OnHide>
        self.NextUpdate = 0;
          </OnHide>
          <OnLoad>
        RecipeBook:OnLoad(self);
        self:RegisterEvent("CHAT_MSG_COMBAT_FACTION_CHANGE");
        self.Schedule = {};
        self.NextUpdate = 0;
          </OnLoad>
          <OnEvent>
        RecipeBook:OnEvent(self, event);
          </OnEvent>
          <OnUpdate>
        self.NextUpdate = self.NextUpdate - elapsed;
        RecipeBook:RunScheduler(self);
          </OnUpdate>
        </Scripts>
      </Frame>


    And the .lua file registers the events in:

    --[[ OnLoad(self) --> Registers events, sets up basic slash commands ]]--
    function RecipeBook:OnLoad(self)
       RecipeBook.Parms.Debug.Last = GetCVar("scriptErrors");
       if RecipeBook.Parms.Debug.Enabled then
          SetCVar("scriptErrors", 1)
       end;
    
       --== Configuration Frame ==--
       UIPanelWindows["RecipeBook_ConfigFrame"] = {area = "center", pushable = 0};
       tinsert(UISpecialFrames, "RecipeBook_ConfigFrame");
       --== Event Registration ==--
       self:RegisterEvent("ADDON_LOADED");
       self:RegisterEvent("PLAYER_ENTERING_WORLD");    --For loading data
       self:RegisterEvent("PLAYER_LEAVING_WORLD");    --For writing data
       self:RegisterEvent("AUCTION_HOUSE_SHOW");    -- For Auction house hooks
       self:RegisterEvent("BANKFRAME_OPENED");
       self:RegisterEvent("BANKFRAME_CLOSED");
       self:RegisterEvent("MAIL_SEND_INFO_UPDATE");
       -- Skillups for disenchants make baby enchanters happy.
       self:RegisterEvent("CHAT_MSG_SKILL");
       self:RegisterEvent("CHAT_MSG_ADDON");
       self:RegisterEvent("CHAT_MSG_SYSTEM");
       self:RegisterEvent("PLAYER_REGEN_ENABLED");
       --Turning off bag updates during combat
       self:RegisterEvent("PLAYER_REGEN_DISABLED");
       self:RegisterEvent("AUCTION_HOUSE_CLOSED");
       self:RegisterEvent("ITEM_LOCK_CHANGED");
       self:RegisterEvent("CHAT_MSG_LOOT");
       self:RegisterEvent("MAIL_CLOSED");
       
       --    self:RegisterAllEvents();
       --Slash Command Handlers--
       SlashCmdList["RecipeBook"] = RecipeBook_SlashHandler;
       SLASH_RecipeBook1 = "/recipebook";
       SLASH_RecipeBook2 = "/rbook";
       SLASH_RecipeBook3 = "/rbk";
       
    --   DEFAULT_CHAT_FRAME:AddMessage(RECIPEBOOK_LOADED);
       
    end


    Did I break things here when I replaced "this" with "self"?
    Posted in: Lua Code Discussion
  • 0

    posted a message on AHsearch
    Worked just fine for me! YAY!

    /e resumes his pillaging and stealing of all the gold on the server.
    Posted in: General AddOns
  • 0

    posted a message on AHsearch
    Yay!
    Posted in: General AddOns
  • 0

    posted a message on ScaleMyBags! replacement/update?
    I use OneBag3 for the exact same reason: I swap whole bags in and out of my bank fairly often.

    Having the "bag break" option turned on gives me what sounds like the functionality you want, though it also gives a whole lot more than what you're asking for.
    Posted in: Addon Ideas
  • 0

    posted a message on Noob question about OnEvent
    I put the whole thing up at:

    http://www.darkaftermath-guild.com/tmp/

    Note that this is someone else's addon, who is unable to take the time to update it for 4.0.1, so I'm giving it a shot despite my lack of cluefulness.

    Thank you again!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Noob question about OnEvent
    Sorry about that. Edited to add CODE tags.

    I think the Lua is getting loaded before the XML, but I'm not sure right now how to confirm that. I'll do more research tomorrow.

    Thanks!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Noob question about OnEvent
    I'm trying to update RecipeBook for 4.0.1, and the following from BugGrabber has me stymied:

    4x <string>:"RecipeBookFrame:OnEvent":1: attempt to call method 'OnEvent' (a nil value)
    
    Locals:
    
      ---
    1x <string>:"RecipeBookFrame:OnEvent":1: attempt to call method 'OnEvent' (a nil value)
    <in C code>: in function `LoadAddOn'
    Interface\FrameXML\UIParent.lua:242: in function `UIParentLoadAddOn':
    Interface\FrameXML\UIParent.lua:265: in function `CombatLog_LoadUI':
    Interface\FrameXML\UIParent.lua:519: in function <Interface\FrameXML\UIParent.lua:492>:
    
    Locals:
    (*temporary) = "Blizzard_CombatLog"
    (*temporary) = "ADDON_LOADED"
    (*temporary) = "Blizzard_CombatLog"
    (*temporary) = "ADDON_LOADED"
    (*temporary) = "Blizzard_CombatLog"
    (*temporary) = <function> defined =[C]:-1
    
      ---
    ==============================

    I'm not familiar enough with LUA to figure out where in my code this is having a problem.

    So far I've gone through and changed this -> self, getglobal() to _G[], and added "self" as an argument to OnEvent and OnLoad. I'm sure there's a billion other things to fix, but why/where 'OnEvent' became nil I haven't a clue.

    ================

    RecipeBook.xml:

    <OnEvent>
        RecipeBook:OnEvent(self, event);
     </OnEvent>
    RecipeBook.lua:
    --============================== EVENT HANDLERS ========================--
       -- [ OnEvent(self, event) : So what happens when an event fires? ] --
       function RecipeBook:OnEvent(self, event)
          --RecipeBook:Debug(event);
          if (event == "PLAYER_ENTERING_WORLD") then
             if RecipeBook.Parms.AddOnsLoaded["Recipe Book"] then
                return
             end;
             ...

    My searchfu has failed me. Any suggestions?
    Posted in: Lua Code Discussion
  • 0

    posted a message on AHsearch
    3 things:

    1) Is there anything I can do to help with the re-write? I seriously doubt it, but if there's anything you could farm out to a professional software engineer who only kinda knows LUA, I'll do everything I can.

    2) What/where can I donate to you? I'm more than happy to send cash and/or gold.

    3) As has been said before, THANK YOU THANK YOU THANK YOU for my gold-making machine. Auctioneer is helpful, but AHsearch is definitely more useful to my domination of the AH on my server. At least I'm still making some gold, but not nearly what I was before the patch.
    Posted in: General AddOns
  • 0

    posted a message on Lua IDE???
    Emacs and SVN

    Here's a nickel, kid. Get yourself a better computer. ;D

    http://www.dilbert.com/strips/comic/1995-06-24
    Posted in: General Chat
  • 0

    posted a message on AHsearch
    Quote from kunda
    I will submit an alpha version this weekend. Sorry for the delay.
    @diet: AHsearch does not scan the AH, and I will not add any AH scanning features.

    You rock. I'll happily send you my first-born! Plus a lot of money to take the little sh*t off my hands. ;D
    Posted in: General AddOns
  • 0

    posted a message on Something To Remove Addon Loadup Messages?
    I disabled all addons. Still no motd on login. I triple checked that there *is* a guild motd. :)
    Posted in: General AddOns
  • 0

    posted a message on Something To Remove Addon Loadup Messages?
    Thanks Y!

    A related question: I'm not seeing the guild motd on login with 4.0.1. Anyone happen to know why, or how to get it back?
    Posted in: General AddOns
  • To post a comment, please or register a new account.