Initializing this class more or less handles every part of the initial settings menu. There are no other parts of it which needs to be called, as the initialize function will go through and call every function it needs in order. This function should be initialized with the wrapper for curses around it with the kwargs passed to our wrapper function included.
Initial settings presents the user with the default options used by the script and allows them to go through either individually change or review every one. If any special arguments were thrown into the script from the script converter, it will automatically load them in place of the defaults. At the end, the values are all validated.
Parameters: |
|
---|---|
Returns: | InitialSettings (self) |
Checks values after the user enters a blank character (they ask to begin). The primary function this serves is to check that the reporting server exists, if specified, by resolving the address, doing a handshake, and seeing what requirements, if any, the server has. Currently the only supported requirement is for the project field to not be blank.
Returns: | None |
---|
Prints an error in a standard way above the user input field. The default type, Error, results in a red message, while any other value will print a yellow one.
Parameters: |
|
---|---|
Returns: | None |
This method is a giant loop which calls most other functions. It waits for key presses, validates them, then loops through getting input for what was pressed, validating the input, then seeing if the user is ready to terminate... more or less.
Returns: | None |
---|
Called as part of handleInput(), this method checks for the type of the default value and transforms the input to that... unless the default is None, in which case it assumes String.
It will also check for specific kwargs, such as report, which upon entry it validates it as being a real URL.
Parameters: |
|
---|---|
Returns: | None |
Renders all values prepared from setupDefaults() on the screen, but only once. This method is never called again, so it’s assumed all the values are kept pristine. In addition to printing all the titles and kwargs on screen, it adds into kwmap a 3rd index (kwmap[key][2]) which is a reference to the subwindow for that kwarg’s value. So, in the future, to modify f’s display value:
self.kwmap['f'][2].addstr( 'New Value' )
Returns: | None |
---|
This method loads into kwmap and kwarray the defaults for various kwargs as well as the titles to print in front of them on the display screen. It does nothing more than just loading the values up, renderList() does the dirty work.
Returns: | None |
---|