Subj : Fix for frame.js
To   : alterego
From : Digital Man
Date : Sat Aug 01 2020 11:42 pm

 Re: Fix for frame.js
 By: alterego to Digital Man on Sun Aug 02 2020 03:56 pm

>   Re: Fix for frame.js
>   By: Digital Man to alterego on Sat Aug 01 2020 12:23 pm
>
>  DM> I'm not clear why a '\n' should reset any colors at all. <shrug>
>
> I was working on what happens with console.putmsg() vs frame.putmsg().
>
> Take this snippet:
>
> load('frame.js');
> console.putmsg('\1h\1Rblack/red\x017\1kgray/black\1nblack/red?');
> foo = new Frame(1,4,80,5,BG_BLACK|LIGHTGRAY);
> foo.putmsg('\1h\1Gblack/green\x017\1kgray/black\1nblack/green?');
> foo.open();
> foo.cycle();
>
> It should render 3 pairs of 2 words - the words being the
> background/forground color.
>
> In the first case (console.putmsg):
> * black/red is red text on a black background
> * gray/black is black text on a gray background
> * black/red? is NOT red text on a black background, but rather gray text on
> a black ground.
>
> IE: \n appears to have reset the colors to back background with gray text.
>
> In the second case, using frame:
> * black/green is in fact green text on a black background
> * gray/black is in fact black text on a gray background
> * black/green is NOT green text on a black background, but rather black text
> on a gray background.
>
> IE: \n appears to have reset the foreground color only
>
> (This is prior to the patches I provided you.)
>
> My patch for frame.js that I provided you was to have frame.putmsg be
> consistent with console.putmsg().
>
> If \n should not reset any colors at all, why does it in this case?

Are we still conflating \1n with \n?

'\1n' is: Ctrl-A (attribute), 'N' (normal).

'\n' is C/JS speak for 'new-line character' (or line-feed, ASCII 10).

A '\n' should not be resetting any colors and I don't see any \n's in your example code above.

                                           digital man

This Is Spinal Tap quote #5:
Nigel Tufnel: Authorities said... best leave it... unsolved.
Norco, CA WX: 75.1�F, 56.0% humidity, 0 mph SSE wind, 0.00 inches rain/24hrs

---
� Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net