-
Variables declared in required libraries
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Sep 25 13:37:18 2019
Hi DM,ããFor SlyEdit, there are some global variables I define in one of the required()'d scripts (i.e., in SlyEdit_Misc.js) that are used in SlyEdit.js, and it has always worked fine.ããToday I updated my Synchronet binaries to the latest (September 25th) built binaries (for Windows), and also updated my JavaScript scripts from CVS. Then I noticed that when I try to run SlyEdit, it shows one of the variables is not defined - it's one of the variables defined in SlyEdit_Misc.js. For SlyEdit.js line 150, I get an error saying gUserSettingsFilename is not defined. gUserSettingsFilename is declared in SlyEdit_Misc.js as follows:ããvar gUserSettingsFilename = backslash(system.data_dir + "user") + format("%04d", user.number) + ".SlyEdit_Settings";ããI thought it might be my Synchronet binaries, so I reverted back to my previous binaries (from September 7th), but I'm having the same problem.ããIf I copy the declaration of gUserSettingsFilename into SlyEdit.js, I then see a similar error that something else (a function declared in SlyEdit_Misc.js) isn't defined in SlyEdit.jsããSlyEdit was working fine before I updated my binaries & .js files. I temporarily switched to another editor so I could type this message. Do you know what might have changed that may have caused this?ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Wed Sep 25 14:25:21 2019
Re: Variables declared in required librariesã By: Nightfox to Digital Man on Wed Sep 25 2019 01:37 pmãã > Hi DM,ã >ã > For SlyEdit, there are some global variables I define in one of theã > required()'d scripts (i.e., in SlyEdit_Misc.js) that are used in SlyEdit.js,ã > and it has always worked fine.ã >ã > Today I updated my Synchronet binaries to the latest (September 25th) builtã > binaries (for Windows), and also updated my JavaScript scripts from CVS.ã > Then I noticed that when I try to run SlyEdit, it shows one of the variablesã > is not defined - it's one of the variables defined in SlyEdit_Misc.js. Forã > SlyEdit.js line 150, I get an error saying gUserSettingsFilename is notã > defined. gUserSettingsFilename is declared in SlyEdit_Misc.js as follows:ã >ã > var gUserSettingsFilename = backslash(system.data_dir + "user") +ã > format("%04d", user.number) + ".SlyEdit_Settings";ã >ã > I thought it might be my Synchronet binaries, so I reverted back to myã > previous binaries (from September 7th), but I'm having the same problem.ã >ã > If I copy the declaration of gUserSettingsFilename into SlyEdit.js, I thenã > see a similar error that something else (a function declared inã > SlyEdit_Misc.js) isn't defined in SlyEdit.jsã >ã > SlyEdit was working fine before I updated my binaries & .js files. Iã > temporarily switched to another editor so I could type this message. Do youã > know what might have changed that may have caused this?ããI moved some KEY_* defines from sbbsdefs.js to a new file: load/key_defs.js and in there added some CTRL_* key definitions that are commonly used (CTRL_A - CTRL_Z).ããI'm guessing that one of your require() statements is checking for a symbol that's now defined by sbbsdefs.js->key_defs.js, so your load-lib isn't being loaded. Changing the symbol being checked for in the require() call should fix that.ãã digital manããThis Is Spinal Tap quote #18:ãSustain, listen to it. Don't hear anything. You would though were it playing.ãNorco, CA WX: 85.6øF, 46.0% humidity, 9 mph ENE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Sep 25 14:54:24 2019
Re: Variables declared in required librariesã By: Digital Man to Nightfox on Wed Sep 25 2019 02:25 pmãã > I moved some KEY_* defines from sbbsdefs.js to a new file: load/key_defs.jsã > and in there added some CTRL_* key definitions that are commonly usedã > (CTRL_A - CTRL_Z).ã >ã > I'm guessing that one of your require() statements is checking for a symbolã > that's now defined by sbbsdefs.js->key_defs.js, so your load-lib isn't beingã > loaded. Changing the symbol being checked for in the require() call shouldã > fix that.ããAside from the SlyEdit scripts, the only libraries it calls require() to load are sbbsdefs.js and dd_lightbar_menu.js (which I wrote). With sbbsdefs.js, it uses K_NOCRLF for the symbol being checked, and it looks like K_NOCRLF is still in sbbsdefs.js. So I'm not sure what else I could look for.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã
-
From
Digital Man@VERT to
Nightfox on Wed Sep 25 15:35:19 2019
Re: Variables declared in required librariesã By: Nightfox to Digital Man on Wed Sep 25 2019 02:54 pmãã > Re: Variables declared in required librariesã > By: Digital Man to Nightfox on Wed Sep 25 2019 02:25 pmã >ã > > I moved some KEY_* defines from sbbsdefs.js to a new file:ã > > load/key_defs.js and in there added some CTRL_* key definitions that areã > > commonly used (CTRL_A - CTRL_Z).ã >ã > > I'm guessing that one of your require() statements is checking for aã > > symbol that's now defined by sbbsdefs.js->key_defs.js, so your load-libã > > isn't being loaded. Changing the symbol being checked for in theã > > require() call should fix that.ã >ã > Aside from the SlyEdit scripts, the only libraries it calls require() toã > load are sbbsdefs.js and dd_lightbar_menu.js (which I wrote). Withã > sbbsdefs.js, it uses K_NOCRLF for the symbol being checked, and it looksã > like K_NOCRLF is still in sbbsdefs.js. So I'm not sure what else I couldã > look for.ããLooking at SlyEdit.js, I see this line:ãã require(gStartupPath + "SlyEdit_Misc.js", "CTRL_A");ããThat means that SlyEdit_Misc.js won't be load()'d unless CTRL_A is undefined. Well CTRL_A is now defined by key_defs.js which is loaded by sbbsdefs.js. So change that "CTRL_A" to something more unique to SlyEdit_Misc.js.ãã digital manããSynchronet "Real Fact" #10:ãThe name "DOVE-Net" was suggested by King Drafus (sysop of The Beast's Domain).ãNorco, CA WX: 84.6øF, 51.0% humidity, 8 mph E wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
-
From
Nightfox@VERT/DIGDIST to
Digital Man on Wed Sep 25 17:08:07 2019
Re: Variables declared in required librariesã By: Digital Man to Nightfox on Wed Sep 25 2019 03:35 pmãã DM> Looking at SlyEdit.js, I see this line:ãã DM> require(gStartupPath + "SlyEdit_Misc.js", "CTRL_A");ãã DM> That means that SlyEdit_Misc.js won't be load()'d unless CTRL_A isã DM> undefined. Well CTRL_A is now defined by key_defs.js which is loaded byã DM> sbbsdefs.js. So change that "CTRL_A" to something more unique toã DM> SlyEdit_Misc.js. ããAh, that makes sense. I made that update and that worked. Thanks.ããNightfoxãã---ã þ Synchronet þ Digital Distortion: digitaldistortionbbs.comã