Prat 3.0

632 - rewhisper with WIM fails in mod:SetBorderByChannel(...)

SOLUTION  ***********************************************************************************************************************************

The bug is on Line 681 of Editbox.lua inside mod:SetBorderByChannel(...)
if attr is nil (which it is in this case) line 681 will fail.  wrapping the whole block from 671 to 682 in an if attr ~= nil solves this.

*************************************************************************************************************************************************

What steps will reproduce the problem?
1. install WIM (wow instant messenger)
2. whisper someone
3. use the hotkey to re-whisper (shirt-R by default I think)

What is the expected output? What do you see instead?
WIM opens up the last person you whispered and lets you start typing

What version of the product are you using?
## Interface: 50001
## X-Curse-Packaged-Version: 3.5.1
## X-Curse-Project-Name: Prat 3.0
## X-Curse-Project-ID: prat-3-0
## X-Curse-Repository-ID: wow/prat-3-0/mainline

*IMPORTANT* -> Can you reproduce the problem when ONLY Prat is running?
No but the I found the problem and fixed it locally, solution below

Do you play on US or EU. What language do you use?
US, en-US

Do you have an error log of what happened?
Message: Interface\FrameXML\FloatingChatFrame.lua:972 bad argument #1 to 'strsub' (string expected, got nil)
Time: 10/05/12 19:18:31
Count: 1
Stack: [C]: ?
[C]: in function `strsub'
Interface\FrameXML\FloatingChatFrame.lua:972 in function `FCF_StripChatMsg'
Interface\FrameXML\ChatConfigFrame.lua:1464 in function `GetMessageTypeColor'
Interface\AddOns\Prat-3.0\modules\Editbox.lua:681 in function <Interface\AddOns\Prat-3.0\modules\Editbox.lua:666
(tail call): ?
Interface\FrameXML\ChatFrame.lua:3506 in function <Interface\FrameXML\ChatFrame.lua:3498
[C]: in function `ChatFrame_ReplyTell2'
[string "REPLY2"]:1: in function <[string "REPLY2"]:1>

Please provide any additional information below.

User When Change
digitalzilla Oct 06, 2012 at 02:47 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of digitalzilla digitalzilla Nov 28, 2012 at 04:52 UTC - 0 likes

    @Quiksmage: Go

    Sorry, just came back looking for my own fix after the update... To implement the fix, just replace that function (mod:SetBorderByChannel(...) on line 666 with this

    	function mod:SetBorderByChannel(...)
    		self.hooks.ChatEdit_UpdateHeader(...)
    		for index, frame in ipairs(self.frames) do
    			local f = _G["ChatFrame" .. index .. "EditBox"]
    			local attr = f:GetAttribute("chatType")
    			if attr ~= nil then
    				if attr == "CHANNEL" then
    					local chan = f:GetAttribute("channelTarget")
    					if chan == 0 then
    						local c = self.db.profile.borderColor
    						frame:SetBackdropBorderColor(c.r, c.g, c.b, c.a)
    					else
    						local r, g, b = GetMessageTypeColor("CHANNEL" .. chan)
    						frame:SetBackdropBorderColor(r, g, b, 1)
    				end
    					
    				else
    					local r, g, b = GetMessageTypeColor(attr)
    					frame:SetBackdropBorderColor(r, g, b, 1)
    				end
    			end
    		end
    	end
    
    Last edited Nov 28, 2012 by digitalzilla
  • Avatar of Quiksmage Quiksmage Nov 03, 2012 at 04:50 UTC - 0 likes

    Can you give me an example of how to do this solution?

    SOLUTION The bug is on Line 681 of Editbox.lua inside mod:SetBorderByChannel(...) if attr is nil (which it is in this case) line 681 will fail. wrapping the whole block from 671 to 682 in an if attr = nil solves this.

    I'd like to be able to shift r some people =P. Thanks

  • 2 comments

Facts

Last updated
Nov 03, 2012
Reported
Oct 06, 2012
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
2
Component
Specific Module

Reported by

Possible assignees