home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 32709 
 Josh Renaud to GitLab issue in main/sbbs 
 Black-on-black doesn't change attributes 
 11 Nov 25 20:30:33 
 
TZUTC: -0800
MSGID: 58834.sync_sys@1:103/705 2d7a293b
PID: Synchronet 3.21a-Linux master/88b423313 Sep 29 2025 GCC 12.2.0
TID: SBBSecho 3.31-Linux master/d39e01091 Nov 03 2025 GCC 12.2.0
BBSID: VERT
CHRS: ASCII 1
FORMAT: flowed
open https://gitlab.synchro.net/main/sbbs/-/issues/1007

If you use Frame.js's .putmsg() to write text in a color (say blue-on-black),
then OVERWRITE that text with identical text in a different color (say
red-on-black), it works as expected. 
 
But if instead you were to overwrite with BLACK-on-black, it does NOT work.
The frame keeps the previous foreground attribute (blue) instead of changing
to black.

In contrast, console.putmsg() does NOT have this problem. It handles
black-on-black just fine.

I presume there is a logic problem in Frame.prototype.putmsg(), but I haven't
been able to figure it out.

Here's a short test case script:

```
load("sbbsdefs.js");
load("frame.js");

// COLOR CODES
var lowRed = '\1N\1R\10';
var lowBlue = '\1N\1B\10';
var lowWhite = '\1N\1W\10';
var highCyan = '\1H\1C\10';
var lowBlack = '\1N\1K\10';
var highBlack = '\1H\1K\10';

console.clear();

// PLAIN CONSOLE VERSION
console.gotoxy(1,1);
console.putmsg(lowWhite + 'PLAIN CONSOLE VERSION');
mswait(4000);
console.gotoxy(1,1);
console.putmsg(lowBlue + 'TEST1 TEST1' + highBlack + ' ... should say TEST1
TEST1 in low blue on black   ');
mswait(4000);
console.gotoxy(1,1);
console.putmsg(lowBlack + 'TEST2 TEST2' + highBlack + ' ... should say TEST2
TEST2 in black on black     ');
mswait(4000);
console.gotoxy(1,1);
console.putmsg(highCyan + 'TEST3 TEST3' + highBlack + ' ... should say TEST3
TEST3 in high cyan on black ');
mswait(4000);

// FRAME VERSION
testFrame = new Frame(1, 1, 80, 24, BG_BLACK);
testFrame.open();
testFrame.draw();
testFrame.gotoxy(1,1);
testFrame.putmsg(lowWhite + 'FRAME.JS VERSION');
testFrame.cycle();
mswait(4000);
testFrame.gotoxy(1,1);
testFrame.putmsg(lowBlue + 'TEST1 TEST1' + highBlack + ' ... should say TEST1
TEST1 in low blue on black    ');
testFrame.cycle();
mswait(4000);
testFrame.gotoxy(1,1);
testFrame.putmsg(lowBlack + 'TEST2 TEST2' + highBlack + ' ... should say TEST2
TEST2 in black on black     ');
testFrame.cycle();
mswait(4000);
testFrame.gotoxy(1,1);
testFrame.putmsg(highCyan + 'TEST3 TEST3' + highBlack + ' ... should say TEST3
TEST3 in high cyan on black ');
testFrame.cycle();
mswait(4000);
```
--- SBBSecho 3.31-Linux
 * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
SEEN-BY: 10/0 1 102/401 103/1 13 17 705 105/81 106/201 124/5016 128/187
SEEN-BY: 129/14 153/7715 154/110 214/22 218/0 1 215 601 610 700 840
SEEN-BY: 218/860 880 226/30 227/114 229/110 112 206 317 400 426 428
SEEN-BY: 229/470 700 705 266/512 280/464 291/111 301/1 320/219 322/757
SEEN-BY: 342/200 396/45 460/58 633/280 712/848 902/26 5075/35
PATH: 103/705 218/700 229/426


<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca