• 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.ãã DM> But putmsg() should return the current attribute even on the next line,ã DM> 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.ã DM> 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.ã >ã > DM> But putmsg() should return the current attribute even on the next line,ã > DM> 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ãã 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?ãã...ëîåïãã... 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ã >ã > 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ã
  • 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ãã DM> Are we still conflating \1n with \n?ããYup, my bad - I do mean \1n.ãã DM> A '\n' should not be resetting any colors and I don't see any \n's in yourã DM> 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ã >ã > DM> Are we still conflating \1n with \n?ã >ã > Yup, my bad - I do mean \1n.ã >ã > DM> A '\n' should not be resetting any colors and I don't see any \n's inã > DM> 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ãã al> So am I right - \1n should reset the colors to black background and whiteã al> 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ãã al>> So am I right - \1n should reset the colors to black background andã al>> white foreground?ãã MR> 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ã >ã > al> So am I right - \1n should reset the colors to black background andã > al> 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ãã DM> That is incorrect. A Ctrl-AN reverts all attributes to "normal", lightgrayã DM> on black, non-blinking.ããããoh i've been doing \1n\1X for the color for a long time.ã---ã þ Synchronet þ ::: BBSES.info - free BBS services :::ã