• MsgBase.cfg object

    From Khelair@TINFOIL to All on Friday, February 19, 2016 05:04:03
    Is there some way other than MsgBase.cfg.index to retrieve the current index of either the current sub or the opened MsgBase object? I'm running into a wall that I've hit a few times here where I keep getting exceptions thrown about 'mBase.cfg.index is undefined', where mBase is my verified open MsgBase object. I've stumbled around this problem many times before, but I'm having trouble figuring out how I got around it before. Is this still a supported object in the Synchronet JS api?
    Very much appreciate any information on this you might be able to give. Thanks for your time.

    -D/K

    ---
    Borg Burgers: We do it our way; your way is irrelevant.
    ■ Synchronet ■ Tinfoil Tetrahedron BBS telnet://tinfoil.synchro.net
  • From Nightfox@DIGDIST to Khelair on Friday, February 19, 2016 12:45:20
    Is there some way other than MsgBase.cfg.index to retrieve the current index of either the current sub or the opened MsgBase object? I'm
    running
    into a wall that I've hit a few times here where I keep getting
    exceptions
    thrown about 'mBase.cfg.index is undefined', where mBase is my verified
    open
    MsgBase object. I've stumbled around this problem many times before, but I'm having trouble figuring out how I got around it before. Is this
    still a
    supported object in the Synchronet JS api?
    Very much appreciate any information on this you might be able to give. Thanks for your time.

    msg_area.sub is an associative array of all sub-boards, indexed by internal code. You probably know the internal code you used to create the MsgBase object, so you could look into msg_area.sub[code] (where code is the
    internal code of the message sub-board) - There's probably a property there that has the index of the current sub. I can't look into it more right now, but you can output all the properties & their values of that in JavaScript
    like this:

    for (var prop in msg_area.sub[code])
    console.print(prop + ": " + msg_area.sub[code][prop] + "\r\n"); console.pause();

    Nightfox

    ---
    ■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man to Khelair on Friday, February 19, 2016 18:30:59
    Re: MsgBase.cfg object
    By: Khelair to All on Fri Feb 19 2016 05:04 am

    Is there some way other than MsgBase.cfg.index to retrieve the current index of either the current sub or the opened MsgBase object? I'm running into a wall that I've hit a few times here where I keep getting exceptions thrown about 'mBase.cfg.index is undefined', where mBase is my verified open MsgBase object. I've stumbled around this problem many times before, but I'm having trouble figuring out how I got around it before. Is this still a supported object in the Synchronet JS api?

    Yes, it's still supported, but only for sub-boards (not the "mail" base).

    Very much appreciate any information on this you might be able to give. Thanks for your time.

    Is it possible you have the "mail" base open with a MsgBase object and that's why there's no 'cfg' property?

    digital man

    Synchronet "Real Fact" #38:
    Synchronet first supported Windows NT v6.x (a.k.a. Vista/Win7) w/v3.14a (2006). Norco, CA WX: 59.6°F, 66.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs