Thread Tools Display Modes
10-25-14, 06:50 PM   #1
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Parsing chat - and "skinning" pet combat

Hi guys!

I noticed 2 issues with my chat add-on; it added a 1 before every single chat string. Since regex is completely not my thing; I just don't get it. I haven't been able to fix it. I frankensteined several add-ons for it - namely rChat, PhanxChat and Gibberish (respectively by zork, Phanx and P3lim - I apologize to you if I wasn't supposed to.)

As per Phanx' request to post the code :
https://github.com/moonwitch-wow/Talkative2 (Channelnames.lua)
I noticed that it's with CHAT_MSG_EMOTE, CHAT_MSG_GUILD, CHAT_MSG_CHANNEL etc

@Phanx; I used a 2 as "new add-on" because I wanted to keep both running next to one another for a while Will end up being renamed to Talkative :P

The second issue is the pet combat log. I can't seem to properly capture it to skin the tab. Never been able to either.

I tried :
Lua Code:
  1. local old_OpenTemporaryWindow = FCF_OpenTemporaryWindow
  2. FCF_OpenTemporaryWindow = function(...)
  3.   local frame = old_OpenTemporaryWindow(...)
  4.   Talkative2.skin(frame)
  5.   return frame
  6. end

I looked at Phanx' post about this; but couldn't get it working. I am sorry.
__________________
  Reply With Quote
10-25-14, 07:21 PM   #2
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Little added note :
Even when I disable EVERY add-on and reset my complete UI... still in front of everything.... I am slightly baffled by this by now.
__________________
  Reply With Quote
10-25-14, 10:19 PM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by MoonWitch View Post
@Phanx; I used a 2 as "new add-on" because I wanted to keep both running next to one another for a while Will end up being renamed to Talkative :P
You can leave it called Talkative 2. Phanx's beef is when someone creates a whole new project/download/page for a new version. Users don't get the upgrade, they have to know about it and go looking for it.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-26-14, 02:29 AM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Just loaded it up by itself, and saw this:
http://imgur.com/KDV4li5
ChatFrame2 layout seems to be quite broken. There's no visible tab or any other way to interact with the frame, and the button frame next to it doesn't match the frame height.

For the actual questions:

1) Could not reproduce, with or without other addons, and I don't see anything in your code that should be causing it. Try clearing your cache.

2) This is happening because the function you use to skin the tabs ("Tabify" in flash.lua) doesn't accept an argument telling it which frame to skin. It just loops over all the normal chat windows and skins their tabs. You need to either (a) call "Tabify" from your "skin" function instead of calling it at PLAYER_LOGIN or (b) set up another hook to call "Tabify" when new chat windows are created.

On a side note, while your "skin" function does correctly reference the frame passed into it, it's doing so 10 times, because it's looping over 1,NUM_CHAT_WINDOWS and running the code for each of them. Get rid of the loop wrapper.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-26-14, 03:58 AM   #5
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
Originally Posted by Phanx View Post
Just loaded it up by itself, and saw this:
http://imgur.com/KDV4li5
ChatFrame2 layout seems to be quite broken. There's no visible tab or any other way to interact with the frame, and the button frame next to it doesn't match the frame height.
I know, sadly I know. It's on the "need to fix asap". But the 1 thing annoyed me more.

Originally Posted by Phanx View Post
1) Could not reproduce, with or without other addons, and I don't see anything in your code that should be causing it. Try clearing your cache.
Thanks to our lil Skype - it's the time stamps for someone who's running into the same issue.

Originally Posted by Phanx View Post
2) This is happening because the function you use to skin the tabs ("Tabify" in flash.lua) doesn't accept an argument telling it which frame to skin. It just loops over all the normal chat windows and skins their tabs. You need to either (a) call "Tabify" from your "skin" function instead of calling it at PLAYER_LOGIN or (b) set up another hook to call "Tabify" when new chat windows are created.
Working on this one

Originally Posted by Phanx View Post
On a side note, while your "skin" function does correctly reference the frame passed into it, it's doing so 10 times, because it's looping over 1,NUM_CHAT_WINDOWS and running the code for each of them. Get rid of the loop wrapper.
[/quote]
Fixed this; I thought it looked bizarre to reiterate over them again. :P
__________________
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Parsing chat - and "skinning" pet combat


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off