Subj : Re: recursion errors
To   : Nightfox
From : Rastus
Date : Sun Dec 29 2013 11:16 pm

Nightfox wrote:

>   Re: Re: recursion errors
>   By: Rastus to echicken on Sun Dec 29 2013 12:03:42
>
>  Ra> I ran into trouble when I added a Message Base to a menu..
>
> When you say you added a message base to a menu, what does that mean
> exactly? A command to read messages?


Yes.. A command to read messages.. Reads fine.. but when replying or posting
from there is where the problem occurs but only IF using an FS Editor such
as SlyEdit which is JavaScript.  However, if the user does not use a JS
editor then no errors occur.

(The editor only presents an issue because it IS JavaScript .. So don't get
hung up on this specific command.)

        case BNREAD:
           console.gotoxy(1, BREMenu.topLeftY + BREMenu.height);
           console.print("^An^Ah^AyStarting ....");
           console.clear()
           bbs.scan_msgs("bn000d");
           break;

> L169_Menu.js is not one of the files in my BRE/LORD menu package.  Can you
> give
> more details on where you got that file from?  Or is it one that you
> created? If so, posting the code on & around line 206 might help us see
> what the issue might be.
>
>  Ra> !JavaScript  /sbbs/exec/SlyEdit.js line 1: unknown (can't convert to
>  Ra> string)
>
> I'm not sure about that one..  Line 1 of SlyEdit.js is a comment, so the
> JavaScript interpreteer should simply ignore it.  I'm not sure why it's
> giving you an error there.

No it's not a comment, it is the error message as output by Synchronet to
the terminal.  (see better description below)

> When you say "layer", do you mean creating another menu based on the
> option chosen from the first menu?


I'll start over...

I use Erics BRE/Lord Menus for all my external programs.  The filenames
below are those that I created using the original as a template.  The first
"Layer" is the main External Program (DOOR) Menu.. Most of the commands in
DOOR_Menu.js point to other Menus such as L169_Menu.js which then point to
an external program..  This is not a problem unless that Third program is
also a JavaScript program.. if it IS a JS script program then the error as I
listed it below occurs.

I don't know how else I can explain it.. maybe this will help..

This works:
(Level 0) Baja Main Menu -->
(Level 1)DOOR_Menu.js --> (Level 2) L169_Menu.js --> (Level 3) EXT_Prog_ID
(the above works but ONLY if Level3 is NOT a JavaScript Program)

This does not:
(Level 0) Baja Main Menu -->
(Level 1)DOOR_Menu.js --> (Level 2) L169_Menu.js --> (Level 3) AnyOther.js

The following lines between the snips are the error out as reported by
Synchronet.


---<snip>--
!JavaScript  /sbbs/exec/L169_Menu.js line 206: too much recursion
!JavaScript  /sbbs/exec/SlyEdit.js line 1: unknown (can't convert to string)

!ERROR compiling /sbbs/exec/SlyEdit.js
---<snip>---

(The script file names are not important..as ANY JavaScript will fail when
called from what I called Level 2)

--
Nicholas Loch | SysOp: Electronic Warfare BBS
Play Barren Realms Elite, Falcon's Eye, & More!
http://www.ewbbs.net | telnet://bbs.ewbbs.net

---
� Synchronet � Electronic Warfare BBS | telnet://ewbbs.synchro.net