Skip to content

Message Base Access

Damon Getsman edited this page Jan 24, 2016 · 9 revisions

dmbase.js

Notes

At this point, all of the message base functionality is located in this file. I am planning on breaking it up in the future, however, as it's growing a bit difficult to handle at this point on the console based machine that I'm doing development on, at over 550 lines.

Also, due to some issues in current implementation of the message scanning routines, I may be rewriting these completely, with an API laid out first. Please see new proposed scan method.

NOTE: This has been broken up more now, and more will be coming in the future.

Layout

Needs substantial revision as far as the OO layout. Currently everything is located within the msg_base highest level object in the file. Ideas for breaking it down involve pulling out the message read handling issues, the associated functionality (non-message related options available at the sub-menu), and other tangental functionality and locating them in sub-objects or different objects all together as applicable.

Current OO Structure of msg_base

Properties

  • log_header - for tagging log files appropriately when the keystroke commands are not at the primary menu level
  • menu - end of message/finished reading menu

Methods

NOTE: Due to restructuring, many of these methods have been placed (inappropriately) into the entry_level sub-object; this will be fixed soon. Also, pending a rewrite, these are totally fucked up and stepping all over each others' toes. I'm going to make sure that I've got the prototypes figured out before I implement them, then gut them, and rewrite them to work together a little bit better.

  • dispMsg() - displays current message (pause delimited or screendump mode)
  • scanSub() - scans an individual sub-board for new messages
  • Please see new proposed scan method
  • doMPrompt() - do end of message prompt with dynamic values inserted that were not available w/static property attributes
  • openNewMBase() - handles the chunk of code from scanSub() that was being repeatedly called when opening a new sub and testing for errors
  • verifyBounds() - is supposed to make sure that scanSub() is within legit bounds when looking for new messages
  • readNew() - checks if message base has new messages and initiates a new message scan via nav.findNew()

Sub-Objects

read_cmd

Currently only populated by rcChoice() handling passing off of various menu options from the read sub-menu level

Properties
  • rcMenu - read command menu
Methods
  • rcChoice() - choice handling from the read command menu
entry_level - methods utilized when dropping through the main menuing system
Methods
  • handler() - forwards command to the appropriate methods for entry into the message reading routines
  • listKnown() - lists all known message sub-boards (optionally broken down by message base group)