Shoutbox

Icon panel - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: WLM Plus! Bug Reports (/forumdisplay.php?fid=7)
+----- Thread: Icon panel (/showthread.php?tid=65770)

Icon panel by tony on 09-03-2006 at 02:03 PM

well, this might be a bug, or it might be reported earlier. you guys can delete this asap.

[Image: idkdu2.jpg]

icon panel isnt apearing on the 2th line or the 3th.


RE: Icon panel by CookieRevised on 09-03-2006 at 02:06 PM

confirmed

PS: the panel doesn't appear as soon as you have a cariage return; if the first line is simply wrapped on the second line, the panel does appear.

EDIT:

quote:
Originally posted by Mattike
Also confirmed here, very strange bug. :^)
indeed... I wonder too how this was programmed in Plus!, as I would expect it to catch a keypress (much like the ChatWndEditKeyDown event). Failing after a carriage return seems strange.

EDIT (after Patchou's reply): makes all sense now. thanks for explanation Patchou (Y) (and fixing of course)
RE: Icon panel by Matti on 09-03-2006 at 02:46 PM

Also confirmed here, very strange bug. :^)


RE: Icon panel by absorbation on 09-03-2006 at 02:51 PM

Confirmed, after tony pointed it out to me on Messenger :P


RE: Icon panel by Patchou on 09-05-2006 at 04:36 PM

Fixed, and as you seem interested to know why this was happening, here was the reason: when you press the parenthesis key, a timer is created to display the emoticon panel. When this timer elapses, Messenger Plus! does several checks to make sure the panel should be displayed, for example, it checks if the last character before the selection carret is indeed a parenthesis (in case the user would have continued to typed).

To check this character, the software was getting the text with a call to WM_GETTEXT, then the selection with EM_GETSEL and checked the character at the given index. The problem is that WM_GETTEXT can convert single carriage returns into double ones (\r\n) but as far as the selection is concerned, it still counts for only one character which makes it be off of 1 character and the posiution of the parenthesis couldn't be confirmed.


RE: Icon panel by Matti on 09-05-2006 at 05:00 PM

Indeed, I now see. When I type a single '(' on a second line, it doesn't show up, but when I type it again, it shows up since the previous character is a '('. :o
Maybe you should replace those double returns with single ones? And then add the amount of found returns before the selection to get the last character? ^o) I don't know, I'm just guessing. :P


RE: Icon panel by Patchou on 09-05-2006 at 06:19 PM

that would be an idea but this was actually fixed more easily with EM_GETTEXTRANGE as this makes sure there's a 1-1 correspondance between selection index and character index.