• Fix for frame.js

    From alterego@VERT/ALTERANT to Digital Man on Sat Jul 25 23:39:56 2020
    Hey DM,

    I have a fix for frame.js - I noticed an issue that \1n was not reseting back to normal (normal being black background).

    Eg: I had this:

    const frame = new Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRAY);
    frame.gotoxy(1,1);
    frame.putmsg(test);

    and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would still have a white background with black text.

    This patch changes the background back to black when putmsg sees \n.

    MTExOWQxMTE4CjwgCQkJCXRoaXMuX19wcm9wZXJ0aWVzX18uY3Vycl9hdHRyPSh0aGlzLl9fcHJv cGVydGllc19fLmN1cnJfYXR0cikmMHg4ZjsK

    ...ëîåï

    ... In matters of conscience, the law of majority has no place.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to alterego on Sun Jul 26 19:29:29 2020
    Re: Fix for frame.js
    By: alterego to Digital Man on Sat Jul 25 2020 11:39 pm

    Hey DM,

    I have a fix for frame.js - I noticed an issue that \1n was not reseting back to normal (normal being black background).

    Eg: I had this:

    const frame = new Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRAY); frame.gotoxy(1,1);
    frame.putmsg(test);

    and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would still have a white background with black text.

    This patch changes the background back to black when putmsg sees \n.

    But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.

    digital man

    This Is Spinal Tap quote #6:
    David St. Hubbins: He was the patron saint of quality footwear.
    Norco, CA WX: 72.9øF, 67.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to alterego on Sun Jul 26 19:40:05 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:29 pm

    Re: Fix for frame.js
    By: alterego to Digital Man on Sat Jul 25 2020 11:39 pm

    Hey DM,

    I have a fix for frame.js - I noticed an issue that \1n was not reseting back to normal (normal being black background).

    Eg: I had this:

    const frame = new Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRAY); frame.gotoxy(1,1);
    frame.putmsg(test);

    and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would still have a white background with black text.

    This patch changes the background back to black when putmsg sees \n.

    But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.

    Or maybe you meant to write: "when putmsg sees \1n".

    digital man

    This Is Spinal Tap quote #30:
    Big bottom, big bottom / Talk about mud flaps, my girl's got 'em!
    Norco, CA WX: 72.9øF, 67.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From alterego@VERT/ALTERANT to Digital Man on Mon Jul 27 12:55:57 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:29 pm

    const frame = new
    Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRA
    Y); frame.gotoxy(1,1);
    frame.putmsg(test);

    and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would
    still have a white background with black text.

    But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.

    Well, I'm not sure.

    Without my patch, writing to a frame (I'm using frame.putmsg() not console.putmsg()), \n was not reseting the color - in fact the patch I gave you was just resetting the background color, but I see that I had to update it to reset the foreground color as well.

    ...ëîåï

    ... Modesty is a vastly overrated virtue.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From alterego@VERT/ALTERANT to Digital Man on Mon Jul 27 13:13:02 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:40 pm

    This patch changes the background back to black when putmsg sees \n.
    Or maybe you meant to write: "when putmsg sees \1n".

    Yes - I did mean that.

    The patch I gave you hasnt applied correctly - I probably should have given you a unified diff. <sorry>

    Can you revert it, and put this text in the "case 'N'" stanza:

    this.__properties__.curr_attr=((this.__properties__.curr_attr)&0x8f)|LIGHTGRAY;

    So that stanza not only reverts HIGH and BLINK, it also sets the background and foreground colors back to BG_BLACK|LIGHTGRAY.

    ...ëîåï

    ... I intend to live forever. So far, so good.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to alterego on Sat Aug 1 12:23:08 2020
    Re: Fix for frame.js
    By: alterego to Digital Man on Mon Jul 27 2020 12:55 pm

    Re: Fix for frame.js
    By: Digital Man to alterego on Sun Jul 26 2020 07:29 pm

    const frame = new
    Frame(1,1,console.screen_columns,console.screen_rows,BG_BLACK|LIGHTGRA
    Y); frame.gotoxy(1,1);
    frame.putmsg(test);

    and if test was sending something like \1n\17\1kfoo\1nbar, "bar" would
    still have a white background with black text.

    But putmsg() should return the current attribute even on the next line, no? That's how console.putmsg() works.

    Well, I'm not sure.

    Without my patch, writing to a frame (I'm using frame.putmsg() not console.putmsg()), \n was not reseting the color - in fact the patch I gave you was just resetting the background color, but I see that I had to update it to reset the foreground color as well.

    I'm not clear why a '\n' should reset any colors at all. <shrug>

    digital man

    This Is Spinal Tap quote #12:
    Nigel Tufnel: Well, I don't know - wh-wh-... what're the hours?
    Norco, CA WX: 94.1øF, 32.0% humidity, 10 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From alterego@VERT/ALTERANT to Digital Man on Sun Aug 2 15:56:49 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sat Aug 01 2020 12:23 pm

    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?

    ...ëîåï

    ... The one way sure to conciliate a tiger to allow oneself to be devoured

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to alterego on Sat Aug 1 23:42:57 2020
    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

    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
  • From alterego@VERT/ALTERANT to Digital Man on Sun Aug 2 17:28:04 2020
    Re: Fix for frame.js
    By: Digital Man to alterego on Sat Aug 01 2020 11:42 pm

    Are we still conflating \1n with \n?

    Yup, my bad - I do mean \1n.

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

    So am I right - \1n should reset the colors to black background and white foreground?

    ...ëîåï

    ... When I was crossing the border into Canada, they asked if I had any firearms with me. I said, "What do you need?"

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to alterego on Sun Aug 2 00:35:15 2020
    Re: Fix for frame.js
    By: alterego to Digital Man on Sun Aug 02 2020 05:28 pm

    Re: Fix for frame.js
    By: Digital Man to alterego on Sat Aug 01 2020 11:42 pm

    Are we still conflating \1n with \n?

    Yup, my bad - I do mean \1n.

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

    So am I right - \1n should reset the colors to black background and white foreground?

    Lightgray foreground, but yeah, that's what Ctrl-AN does.

    digital man

    Synchronet/BBS Terminology Definition #54:
    PCMS = Programmable Command and Menu Structure (introduced in SBBS v2)
    Norco, CA WX: 73.7øF, 59.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to alterego on Sun Aug 2 16:47:19 2020
    Re: Fix for frame.js
    By: alterego to Digital Man on Sun Aug 02 2020 05:28 pm

    So am I right - \1n should reset the colors to black background and white foreground?


    no. that just makes it a 'dark' version of the current fg color.
    it might change the bg to black though.
    \1h\1w is bright white
    \1r\1n is dark red
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
  • From Nightfox@VERT/DIGDIST to MRO on Sun Aug 2 16:31:54 2020
    Re: Fix for frame.js
    By: MRO to alterego on Sun Aug 02 2020 04:47 pm

    So am I right - \1n should reset the colors to black background and
    white foreground?

    no. that just makes it a 'dark' version of the current fg color.

    Actually the 'n' attribute resets things back to dim white foreground on black background. The 'n' attribute stands for 'normal', which would mean to reset things back to normal. I've used \1n in a lot of my Synchronet mods and I've always seen it reset back to "normal" dim-white on black background.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to MRO on Sun Aug 2 20:28:02 2020
    Re: Fix for frame.js
    By: MRO to alterego on Sun Aug 02 2020 04:47 pm

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

    So am I right - \1n should reset the colors to black background and white foreground?


    no. that just makes it a 'dark' version of the current fg color.
    it might change the bg to black though.
    \1h\1w is bright white
    \1r\1n is dark red

    That is incorrect. A Ctrl-AN reverts all attributes to "normal", lightgray on black, non-blinking.

    digital man

    Synchronet "Real Fact" #12:
    Synchronet was the first BBS software to ship with built-in RIPscrip support. Norco, CA WX: 71.1øF, 74.0% humidity, 6 mph ENE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to Digital Man on Wed Aug 5 22:44:21 2020
    Re: Fix for frame.js
    By: Digital Man to MRO on Sun Aug 02 2020 08:28 pm

    it might change the bg to black though.
    \1h\1w is bright white
    \1r\1n is dark red

    That is incorrect. A Ctrl-AN reverts all attributes to "normal", lightgray on black, non-blinking.



    oh i've been doing \1n\1X for the color for a long time.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::