WoW BlueTracker Home | RSS | News | Contact
Recent | Search | Archive | CS Posts
Poster: Legorol at 7/23/2005 7:30:17 AM PDT
Subject: Slouken: ToggleCombatLogFileWrite() oddities
   This thread:
http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=181908&p=1
has prompted me to investigate just what exactly is going on with the ToggleCombatLogFileWrite() global function.

The reason why I got curious is because ToggleCombatLogFileWrite is apparently a global function that is not defined in any Lua files (and is therefore part of the internal API), yet it never showed up on any of my scans of the internal API.

Upon investigating, I found that ToggleCombatLogFileWrite is indeed an internal function, but is only added to the Lua namespace at some point after the VARIABLES_LOADED event is sent. To my knowledge, this is the only internal function that is not getting exposed to Lua at load time.

Furthermore, doing a "/console reloadui" removes ToggleCombatLogFileWrite from the Lua namespace and it becomes a nil value. It is only exposed to Lua after login.

Because of the above, the following statements holds:
  • You can't call ToggleCombatLogFileWrite() from an <OnLoad> handler
  • You can't call ToggleCombatLogFileWrite() from an <OnEvent> handler triggered by VARIABLES_LOADED
  • If you do /console reloadui, ToggleCombatLogFileWrite becomes nil and is not callable at all
  • A consequence of the point above: after a reloadui, /combatlog stops working.

    Could you please look into this rather odd behaviour? Thank you!
  •   http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post187123
     
    Poster: slouken at 7/23/2005 9:04:13 AM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddities
       I'm not aware of any function called ToggleCombatLogFileWrite(). I think (I'm not at work, so I can't tell for sure) that the actual function is ToggleCombatLog()
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post187143
    Poster: slouken at 7/25/2005 12:17:40 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddities
       The chat and combat logging were done at different times by different people, so the combat log code never got reinitialized when the UI was reloaded.

    I'm reorganizing, with the following changes:
    ChatFrameLog() and ToggleCombatLogFileWrite() are going away, and being replaced with LoggingChat() and LoggingCombat() respectively. They both take a boolean whether or not that type of logging is enabled, and return the new logging state. If no argument is passed in, the current state is simply returned.
    The file for the chat log is Logs\WoWChatLog.txt and the file for the combat log is Logs\WoWCombatLog.txt
    I'm also adding /chatlog which will toggle chat logging.

    [ post edited by slouken ]

      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188214
    Poster: slouken at 7/25/2005 12:45:28 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       Yes, 1.7, and yes, I believe it will record all channels.
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188244
    Poster: slouken at 7/25/2005 2:42:10 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       It'll overwrite the file each session.
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188310
    Poster: slouken at 7/26/2005 7:39:04 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       Actually it does do channels, it logs all chat sent to the UI, regardless of what gets displayed. I fixed a couple bugs with this for 1.7.

    [ post edited by slouken ]

      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188827
    Poster: slouken at 7/26/2005 8:22:00 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       In a world with infinite time... wait that's this world isn't it? Well, um, great ideas, I probably won't have time to implement them though, sorry!
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188840
    Poster: slouken at 7/26/2005 8:35:17 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       Hey, nice solution.
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188848
    Poster: slouken at 7/26/2005 9:01:02 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       Yep.
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post188871
    Poster: slouken at 7/27/2005 5:18:02 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       In 1.7, the logs will append, instead of overwrite. This means that you'll have to delete the file manually if you want to clear old data.
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post189505
    Poster: slouken at 7/27/2005 5:57:57 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       Yeah, that's one of the things I fixed when I was poking around in there (for 1.7)
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post189530
    Poster: slouken at 7/27/2005 9:39:55 PM PDT
    Subject: Re: Slouken: ToggleCombatLogFileWrite() oddit
       *grin* You're welcome!
      http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=187123&p=#post189655

    View all recent official Blue Posts

    WoW Blue Tracker: Archiving World of Warcraft Blue Posts
    since March 2005
    Home | RSS | News | Contact
    Recent | Search | Archive | CS Posts
     

    Why Ads?