 |
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: Sat Feb 02, 2008 3:04 am
[Bug 2.18] Scrolling + Events + Say |
If you use say in events, and have events raise other events etc, then the output to the screen fails to scroll properly.
Clicking on the output window will usually clear this up, and the "hidden" lines will suddenly appear.
eg
Code: |
<event event="install" priority="13220" id="1322">
<value>#if ((%lower($Script) == "scriptmanager") AND (($Version == @spellupData.Version) OR ($Version == "")))
{
#say @ansiPrefix("ScriptManager")@ansiHighlight("Now Installing Package", 11)
#raiseevent registerHelp {$Script}
#raiseevent registerVariable {$Script} {ScriptData}
#addkey ScriptData Version @version($Script)
#say @ansiPrefix("ScriptManager")@ansiHighlight("Installation Complete", 11)
}</value>
<arglist>Script, Version</arglist>
</event>
<event event="registerHelp" priority="12950" id="1295">
<value>#say @ansiPrefix("ScriptManager")@ansiHighlight("Registering Help File ", 11)%ansi(12)"("@ansiHighlight($Script, 15)%ansi(12)")"
#addkey Scripts {$Script} {@Scripts.$Script.1|1|@Scripts.$Script.3}</value>
<arglist>Script</arglist>
</event>
<event event="registerSetup" priority="12960" id="1296">
<value>#say @ansiPrefix("ScriptManager")@ansiHighlight("Registering Setup Alias ", 11)%ansi(12)"("@ansiHighlight($Script, 15)%ansi(12)")"
#addkey Scripts {$Script} {@Scripts.$Script.1|@Scripts.$Script.2|1}</value>
<arglist>Script</arglist>
</event>
<event event="registerVariable" priority="13250" id="1325">
<value>#say @ansiPrefix("ScriptManager")@ansiHighlight("Registering Variable ", 11)%ansi(12)"("@ansiHighlight($Variable, 15)%ansi(12)")"
#addkey Scripts {$Script} {%additem($Variable, @Scripts.$Script)}</value>
<arglist>Script, Variable</arglist>
</event>
|
#raiseevent install ScriptManager 1
should reproduce the bug |
|
_________________ The Drake Forestseer |
|
|
 |
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: Sat Feb 02, 2008 3:09 am |
This is an example, with the output before i click on the output area, and the output (properly rendered) after i click.
The exact lines that are hidden vary, i just replicated the procedure and got 1 more line properly rendered in the pre-click shot.
Also, the bug acts strangely when you get more input from the mud, with the exact number of lines hidden changing, up until you click the screen.
This bug used to occur occasionally in zmud, but it's much easier to reproduce here. |
|
_________________ The Drake Forestseer |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Feb 04, 2008 6:14 pm |
I tried this, and didn't get the errors you described. But I also don't have your @ansiHighlight and @ansiPrefix functons. Please post and I'll retest.
|
|
_________________ Asati di tempari! |
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Feb 04, 2008 7:40 pm |
I can reproduce this bug much simpler:
#event say {#say test %1}
#raiseevent say 1
#raiseevent say 2
#raiseevent say 3
#raiseevent say 4
#raiseevent say 5
It scrolls up only 3 lines. Bringing another window to the front, then bringing the cmud window to front again fixes the display. |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Feb 04, 2008 7:50 pm |
I couldn't reproduce the problem with the simpler script either. I opened CMUD, closed the Session screen, then pressed Ctrl-Q a few times to fill up the screen. Then I pasted:
#event say {#say test %1}
#raiseevent say 1
#raiseevent say 2
#raiseevent say 3
#raiseevent say 4
#raiseevent say 5
into the command line and pressed Enter and it displayed all 5 lines correctly. So are you only having this problem when connected to your MUD, or do you get the problem even in a blank session? |
|
|
 |
alluran Adept
Joined: 14 Sep 2005 Posts: 223 Location: Sydney, Australia
|
Posted: Mon Feb 04, 2008 11:26 pm |
http://sourceinstinct.com/Scroll%20Demo.htm
That's a screen recording replicating the bug. I'm offline when i recorded that. Things work fine UNTIL it has to scroll, then you'll see right at the end, there's a bunch of variable registrations missing, and then suddenly they appear (i clicked)
ansiHighlight (i had a simpler version, but this is the most recent one, 2 params, "Input, Color")
Code: |
#return %ansi(%eval(%if($Color > 8, $Color - 8, $Color + 8)))%subregex(%subregex(%subregex(" "$Input" ", "((?-i)[a-z]*)((?-i)[A-Z0-9])((?-i)[a-zA-Z0-9]*)((?-i)[^a-zA-Z0-9])|((?-i)[a-z])((?-i)[a-z]+)((?-i)[^a-zA-Z0-9])| (?-i)([a-z]) ", "%if(%len(%pat(2)), %concat(%pat(1), %ansi("$Color"), %pat(2), %ansi("%eval(%if($Color > 8, $Color - 8, $Color + 8))"), %pat(3), %pat(4)))%if(%len(%pat(6)), %concat(%ansi("$Color"), %pat(5), %ansi("%eval(%if($Color > 8, $Color - 8, $Color + 8))"), %pat(6), %pat(7), %pat(8)))"), " (?-i)([a-z]) ", " %ansi("$Color")%pat(1) "), "^ | $", "")
|
|
|
_________________ The Drake Forestseer |
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Feb 05, 2008 3:28 pm |
I cannot reproduce the error, either. Maybe there's something else in your settings causing problems. Have you tried to reproduce the problem with no other settings, the way Zugg and I did?
|
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Feb 06, 2008 9:02 am |
I was able to reproduce it a blank session with CMUD Pro.
I loaded CMUD Pro 2.18, I did Ctrl-Q 3 times to load the scroll back buffers then I executed the script. If need be I can do a #DEBUGFILE if that helps. |
|
_________________ Asati di tempari! |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Feb 06, 2008 5:52 pm |
I'm not sure the #DEBUGFILE will actually help since this sounds more like a timing issue of some kind. I just tried what you said and used Ctrl-Q 3 times and then pasted the script into the command line and pressed Enter and still couldn't reproduce it here. So I'm still stumped on this one.
|
|
|
 |
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Feb 06, 2008 6:20 pm |
Interesting. I just tried pasting the whole sequence in at once and also don't see it. But if I put in each command line separately and press enter each time, I do see the problem.
|
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Wed Feb 06, 2008 7:41 pm |
Looks like an old problem with screen not get painted properly. I believed it was fixed in 2.14, at least, Zugg had fixed similar bug for timestamps... Now I remember that I also used #SAY to demonstrate this bug.
It seems that #SAY, while adding its output text to a screen buffer, does not properly paint it to the screen. After this point, CMUD preserve this error until Windows will be forced to draw there another overlapping window. If you see this bug, try to open your package editor window and carefully move it over main window' text. You will see nice effect. I can add that #SHOW does not affected by this bug (at least, I was unable get it to fail using suggested procedure), while #ECHO does.
For the first time I thought that it is a problem with #SAY, but I did not see this bug without #RAISE... Strange thing, actually... |
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|