Daniel Becker Bighelini

SPEL API: VBOP Detail Description

Blog Post created by Daniel Becker Bighelini on Jun 13, 2016

Chapter 5

VBOP Detail Description

 

Table of Contents

  1. Overview...............................................................
  • vbop.vr detail description....................................

Base_color - type color...............................................................................................................

Form_group_dirs - type array of strings...............................................................................................................

Formats - type dictionary...............................................................................................................

Grid_more_image - type image...............................................................................................................

Help_map_dirs - type array of strings...............................................................................................................

Hover_help - type TextItem...............................................................................................................

Keymap - type dictionary...............................................................................................................

Valid key names...............................................................................................................

Styles - type dictionary...............................................................................................................

Architecture dictionaries (currently X11 and Windows)...............................................................................................................

App forms .vr files:...............................................

 

 

 
 

Overview

This is still a rough document.  Don't pick on it or it will break.

Vbop requires four kinds of .vr files:

vgalaxy2.vr /.vgalaxy.1.vr         Contain Galaxy configuration information.  This should not be touched  by anyone.

vgalaxy2.vr                        is stored in $NX_ROOT/bin. .vgalaxy.1.vr is created in the user's home directory.

.vboplst.vr                          Contains form size and grid information in dictionaries - one per form.    This file is created in the user's home directory.

  • vbop.vr                               Contains vbop setup information described below.

*.vr (app forms)                 Contain form groups which are dictionaries of forms as described below.

 
 

vbop.vr detail description

  1. Vbop.vr contains three dictionaries: "Form_groups", "Preferences", "Setup".

Form_groups behaves as if it were an app forms .vr file and is structured  as described below under app forms. Currently it contains a single dictionary named "default" which contains forms "login" and "splash".

Preferences is a galaxy configuration directory, read by galaxy at startup time. Any vbop command line option can be defaulted by adding a string to this dictionary whose name is the flag following the "-" and whose content is the value of the option.  For example to provide a default of -fg green, add a string to this dictionary whose name is "fg" and whose content is "green".

Setup is a dictionary containing vbop configuration information.  It is an unstructured collection of stuff.  The current contents are:

 

Base_color - type color

This is the color from which special field colors (required, modified) are shifted when the user overrides the vbop background color with -bg.  It should be the same as the color specified with bg in the "Preferences" dictionary.  Sorry about the duplication, but I can't read one and Galaxy can't read the other so it had to be duplicated.

Base_color is currently lightsteelblue2.

 

Form_group_dirs - type array of strings

This is a list of directory names to be searched for app .vr files.  The content portion of each string is the path to a separate directory and may reference environment variables using the '$' notation.                The current entries are $NX_ROOT/site/mods/gvr and $NX_DSCONFIG/gvr.

 

Formats - type dictionary

This dictionary contains strings controlling date and number formats and error text to be displayed if the user mis-types the date or number.  The string names and contents are:

date                              "MM/DD/YY hh:mm a(am,pm)"

date_prompt               "Enter the date as MM/DD/YY hh:mm am"

duration                       "HH:mm:ss"

duration_prompt        "Enter the duration as HH:MM[:SS]"

integer                         "-0"

integer_prompt          "Enter a number"

real                               "-0.999999"

real_prompt                "Enter a number"

 

Grid_more_image - type image

This is the "Water spigot" icon that shows up in the corner of a grid that has not fully loaded from the domsrvr.

 

Help_map_dirs - type array of strings

This is a list of directory names to be searched for help .hcx files.  The content portion of each string is the path to a separate directory and may reference environment variables using             the '$' notation.

The current entries are $NX_ROOT/site/mods/help and $NX_DSCONFIG/help.

 

Hover_help - type TextItem

This is a template field used to display hover help information.  This is where the color and font are set for hover help. The current color is light yellow #FFFF80 and the font is Helvetica Bold 12

 

Keymap - type dictionary

This contains strings representing control and/or function keys and field level wand functions to be called on key presses.  The original use was to allow function keys to simulate mouse clicks, but it has been expanded slightly to include other functions.  The name of each string in the dictionary is the name of the wand function and the content of the string is a space delimited list of keys to be mapped to the method.  The keys are specified textually using the notation of ^letter for simple control keys or names for special keys from the list below, optionally modified with ctrl, shift, alt, using '+', for example shift+ctrl+R.

 

Valid key names

1-9 A-Z F1-F35 BACKSPACE BEGIN BREAK CANCEL CLEAR COPY CUT DELETE DOWN END ENTER ESCAPE EXECUTE FIND FRONT HELP HOME INSERT KEYPAD_0 KEYPAD_1 KEYPAD_2 KEYPAD_3 KEYPAD_4 KEYPAD_5 KEYPAD_6 KEYPAD_7 KEYPAD_8 KEYPAD_9 KEYPAD_ADD KEYPAD_DECIMAL KEYPAD_DIVIDE KEYPAD_EQUAL KEYPAD_F1 KEYPAD_F2 KEYPAD_F3 KEYPAD_F4 KEYPAD_MULTIPLY KEYPAD_SEPERATOR KEYPAD_SPACE KEYPAD_SUBTRACT KEYPAD_TAB LEFT LINEFEED MENU MINUS MODE_SWITCH NEXT NUM_LOCK OPEN PAGE_DOWN PAGE_UP PASTE PAUSE PLUS PRINT PRIOR PROPERTIES REDO RETURN RIGHT SCRIPT_SWITCH SCROLL_LOCK SELECT SPACE SYSTEM_REQUEST TAB UNDO UP

            The current entries are:

                                                       list_locate              ^S

                                                       Select_2   F3

                                                       show_help_tag      ctrl+F12

 

               Styles - type dictionary

This contains Text Data Styles for each "special color" field type, ie. required, modified etc.  and for each defined field hilite.  The styles can contain color, font attribute and/or extras like underlining or strikethru.  If more than one style applies to a field a composite style is created, combining color, font and extras from all applicable styles.

NOTE: Setting the color of the style actually sets the field background color rather than the text foreground color as displayed in the style editor.

            The special fields are:

                                                       deleted - used to show data marked as deleted

                                                       modified - used to show changed data

                                                       new - used to show newly created data (currently omitted)

                                                       rdonly - used to show rdonly data

                                                       required - used to show required data

                                                       normal - used to show all the rest.

The style for any of the special fields can be omitted, in which case fields in that state will use the normal style.

Currently the following hilite styles are contained in this dictionary:

            amber

            green

            orange

            red

            yellow

 

Architecture dictionaries (currently X11 and Windows)

These are intended to contain configuration data that varies by architecture. Currently they each contain a single dictionary named Font_map.

Font_map contains a list of strings, each creating one or more aliases for native architecture fonts to other font names which may then be used in application forms.

The name of each string must be the name of a native font.  The content is a comma delimited list of alias font names. THESE STRINGS ARE CASE SENSITIVE.

            The current list for Windows is:

            Arial                                      helvetica

            Courier New                        courier

            Times New Roman          times, new century schoolbook

                  The current list for X11 is empty.

 

App forms .vr files:

Vbop form groups are expanded slightly from Problem Manager form groups.  In problem manager, first the form group specified for the user is searched for the desired form, and if not found, the "default" form group is searched.  Vbop adds to the search order.  First a form group whose name is the user's logon name is searched, followed by the user's specified form group followed by the "default" form group.

Multiple form groups can be contained in a single .vr file and a form group can appear in multiple .vr files.  At run time they will be merged correctly to build the appropriate form groups.

For backward compatability with Problem Manager, vbop queries Problem Manager for the user's form group, so vbop form groups are configured using the Problem Manager tools.

The directories specified in vbop.vr under Form_group_dirs are searched and all .vr files are read.  These files should contain dictionaries containing only forms and may contain a single string named "Version".

The names of the dictionaries should be either user names, or names of existing Problem Manager form groups.  However, it is not an error to create a dictionary with any other name, with or without forms in it.  IE. Adding a new form group can be done either from problem Manager first or from vbop first.  All of the supplied app .vr files contain a dictionary named "default".  At run time the form group dictionaries are merged on a form by form basis with duplicates resolved using the "Version" string as follows:

All app .vr files that we supply contain a "Version" string which consists of a sequence of any length of number '.' number '.' ...  which is interpreted heirarchially.  ie. 4.0 is newer than 3.5, 3.7.1 is newer than 3.7, and 3.11 is newer than 3.2 but older than 3.20.

Customer generated .vr files should NOT contain a "Version" string and are considered to be newer than anything.

NOTE: If a conflict is discovered merging form groups at the same Version an error is reported an it is indeterminate which form will be used.

Outcomes