4.20

From BR Wiki
Revision as of 17:49, 23 July 2013 by Laura (talk | contribs) (→‎Windows Themes Suppression)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Status: Stable

The prior versions were 4.0 and 4.1.

As of 09/18/2008:

4.2 Changes - 01/18/09

New internal BR storage format

BR has a new format for saving programs that allows for the expanded capacities in version 4.2. This format cannot be processed correctly with prior versions of BR. However, during development, it is desirable to be able to make changes to 4.1 programs while one is running version 4.2. So an OPTION is provided for doing this.

Think of it as a mode setting. You are saving in 4.1 format or 4.2 format at any given point.

OPTION 60 [ ON | OFF ] ! save programs in 4.1 loadable form

If an attempt is made to store 4.2 only code in 4.1 format, an error is generated.

Web Bridge Support

New PDF Capability

PDF capabilities introduced.

Windows Themes Suppression

Themes alter the way Windows displays fields (elements within controls). For example different themes display buttons and captions differently, including rounding corners and hilighting. Future versions of windows may do different things when it comes to displaying controls which may effect the colors and shapes of displayed fields.

Microsoft first began using themes with XP. The 'classic look' is the Windows 2000 appearance, which is what is produced when themes are suppressed. Vista permits users to select from among several themes as a part of the user's desktop settings. Sometimes theme processing can slow down the display of large quantities of data, and sometimes it can create an appearance thae is less desirable than the classic look.

BR offers three methods for suppressing the use of Windows Themes:

A new field attribute is defined that may be specified in ATTRIBUTE statements and in FIELDS leading attributes:

^NOTHEME    indicates prevent use of Windows Themes

OPTION 50 ! suppress Windows themes for text boxes only

Config WINDOWS_THEMES OFF | ON This entirely suppresses the use of Windows themes.

Windows Themes Suppression is valid for 4.2+ versions of BR.


NWP Color Shading

NWP supports color shading via the specification "\Eshade_color='#rrggbb'". This works in conjunction with the other NWP shade syntax. Note that if no shading is implemented the this specification has no effect.

BR now saves the PREVIEW window "position" and "maximized" settings across sessions.

During PREVIEW- Print (all) produces a standard Windows print diaglog box so the user can specify copies, range and other printing options.

New INPUT FIELDS Keywords for cursor position

NEXT, NXTROW and NXTCOL introduced

Misc Notes

To use active x controls with PEM use AXIMP.EXE (from the dot net framework) under XP or later.

OPEN window Parent=None positions the window relative to the screen if ROW and COL are specified: Note- Open #0 doesn't honor this because once it has been opened, it keeps the last location of the window in the registry. ( ROW/COL, ROWS/COLS and FONTSIZE )


BUTTONROWS are now changed only when a new Buttonrows value is given. Buttonrows=0 is now supported. If you specify Buttonrows=0 in the Config SCREEN OPENDFLT statement then OPEN #0 will default to Buttonrows=0.


Given the new POS and SRCH use of the "^" character, to search for '^' with "let X=POS(string$,'^',5)" you will need to either turn the search character off with CONFIG SEARCH_CHAR OFF or change the search character to something else as in CONFIG SEARCH_CHAR 7E (where 7E is the hexidecimal representaion of an alternate search character).

ON FNKEY has been disabled ... (use ON FKEY instead) OPTION 58 restores recognition of FNKEY

MIN_FONTSIZE 0x0 clears the MIN_FONTSIZE setting.

Errors Corrected

The BR-VB interface had been broken when 32 bit string lengths were implemented. This has now been restored to 16 bit string lengths.

Parent=None

Parent=None

Library, NoFiles

NoFiles parameter introduced for Library statements.

Combo Boxes

Select implemented.



The leading attribute "^user_entry", returns control upon the cursor entering a field. This does not apply to fields given initial focus by INPUT processing, such as with CURFLD or the first field of a FIELDS operation.

Insert/overstrike remembers the operator's preference. This setting is stored along with the other visual components when you LET SETENV("SCRN_SIZE_POSN")

Pre-Selection of GRID / LIST Elements- PRINT FIELDS "nn,nn,GRID 10/40,ATTR": (mat start, mat end, mat attr$) The leading attribute values "^select" or "^deselect" may be specified.

Concerning blue column and row separators...

PRINT FIELDS "10,20,LIST 10/80,GRIDLINES": 1 | 0 (on or off)

Makes LIST controls look like GRIDs with respect to the display of data.

OPEN ... " ... TABATTR= [tab_attr]" 

Sets tab fonts, but not colors (at this time).

In GRIDs and LISTs only, string arrays may be used to store numeric values. BR automatically perform VAL and STR conversions as needed. Specify #PIC, #FMT and #G for this purpose.

e.g. #pic($##,##0.00-) in conjuction with "231.45", "430", etc.

BR now supports aggregated sorting for LIST/GRIDs. This means when clicking on various column headings or programmatically sorting columns, fields of equal values retain their previous order within their new groupings.

Either P or PICTURE may be specified as a FIELDS field type. Picture was added for readability.



  • POS( str1$, str2$ [, {-}start] )

If str2$ begins with ^ then the ^ is stripped and the search becomes case insensitive. A configuration statement will permit use of a flag character other than ^.

  • SRCH( mat str$, str2$ [, start] )

If str2$ begins with ^ then the ^ is stripped and the search becomes case insensitive AND str2$ is regarded as a SUBSTRING.

SRCH returns zero if it fails (instead of -1) unless OPTION BASE ZERO is in effect - provide OPTION 56 to make this work the old way

New Internal Functions

Str2Mat

NWP Improvements

Native Windows Printing

Print PREVIEW is no longer modal. That is, it runs independently from the BR application.

  • \Epage_number - is replaced with the page number.
  • NWP Field Justification-
  • CHR$(6) implies right justify the previous field for printed output.
  • This works just like \Eright_justify


New NWP Cursor Positioning Mode

\Emove_cursor - this is the old mode with nothing changed


\Estop_cursor - new mode where the cursor does not move horizontally except when tabbing

  • Center uses the current position as the center
  • Right justify uses the current position as the right endpoint
  • The cursor does not move when printing text
  • Newline positioning is honored, but carriage return positioning is ignored.
  • Tab positioning is honored

HTTP Support

More information about HTTP or Hypertext Transfer Protocol can be found at Wikipedia:Hypertext Transfer Protocol.

Business Rules! 4.20 introduces HTTP support.

See also:

The OPEN string for DISPLAY files will support a new parameter called HTTP=CLIENT.

HTTP = CLIENT

OPEN

   HTTP=CLIENT
   NAME=Full URL (web page reference)
   [CONTROL=display-filename]

Optional PRINT (accumulate post data) [ ... ]

  • when the first LINPUT is issued POSTing of all print lines occurs; and
  • all responses are buffered before the LINPUT returns data.
  • If no PRINT statements are issued, the Linput performs a GET rather than a POST.
  • Releases prior to 4.31ga required a PRINT before the first LINPUT.

LINPUT

  • until EOF is reached or until another PRINT is issued
  • a PRINT clears the LINPUT buffer

Processing must be performed in the above sequence or an error is generated.

FILE$(fileno,”HTTPINFO”) returns LOG info for the latest action.

New Error Code- 4340 An HTTP error has occurred. See SYSERR and SYSERR$.

Optional CONTROL Statements

These are case insensitive.

LOG filename

Write all HTTPINFO messages and RESULT strings into filename.

USER-AGENT string

Specify the User-Agent string to send to the HTTP server. Some badly done CGIs fail if its not set to "Mozilla/4.0". To encode blanks in the string, surround the string with single quote marks.

REFERER the linked-from URL

COOKIE “NAME=data”

e. g. “NAME1=value1; NAME2=value2"

If no '=' letter is used in the line, it is treated as a filename used to read previously stored cookie lines from, which should be used in this session if they match. Using this method also activates the "cookie parser" which will record incoming cookies too, which may be handy if you're using this in combination with the -L/--location option. The file format of the file to read cookies from should be plain HTTP headers or the Netscape/Mozilla cookie file format.

NOTE that the file specified with COOKIE is only used as input. No cookies will be stored in the file. To store cookies, save the HTTP headers to a file using DUMP-HEADER.

COOKIE-JAR filename

The name of a file that is to contain a copy of all cookies encountered either inbound or outbound.

DATA filename

Sends the specified data in a POST request to the HTTP server, in a way that can emulate as if a user has filled in a HTML form and pressed the submit button. The data is sent exactly as specified with all newlines cut off. It is expected to be "url-encoded". This will cause curl to pass the data to the server using the content-type application/x-www-form-urlencoded. If more than one DATA option is used on the same command line, the data pieces specified will be merged together with a separating semicolon. Thus, using 'DATA name=daniel skill=great' would generate a post chunk that looks like 'name=daniel&skill=great'.

If you start the data with the letter @, the rest should be a file name to read the data from. The contents of the file must already be url-encoded. Multiple files can also be specified. Posting data from a file named 'footbar' would thus be done with "DATA @footbar".

HEADER additional header parameters

Extra header to use when getting a web page. You may specify any number of extra headers.

DUMP-HEADERS filename

Write the HTTP headers to this file.

HEAD – retrieve headers only

SSLV2 - force SSL version 2

SSLV3 - force SSL version 3

WRITE-OUT string

Used with the following optional substitution values:

url_effective The URL that was fetched last.

http_code The numerical code that was found in the last retrieved HTTP(S) page.

time_total The total time, in seconds, that the full operation lasted. The time will be displayed with millisecond resolution.

time_namelookup The time, in seconds, it took from the start until the name resolving was completed.

time_connect The time, in seconds, it took from the start until the connect to the remote host (or proxy) was completed.

time_pretransfer The time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved.

time_starttransfer The time, in seconds, it took from the start until the first byte is just about to be transferred. This includes time_pretransfer and also the time the server needs to calculate the result.

size_download The total amount of bytes that were downloaded.

size_upload The total amount of bytes that were uploaded.

size_header The total amount of bytes of the downloaded headers.

size_request The total amount of bytes that were sent in the HTTP request.

speed_download The average download speed that BR measured for the complete download.

speed_upload The average upload speed that BR measured for the complete upload.

content_type The Content-Type of the requested document, if there was any.


Future
SQL SUPPORT COMING IN RELEASE 4.30 - The NAME= parameter of a INTERNAL file can reference a text file named filename.SQL, in which case the current database identified in BRConfig.sys is accessed in lieu of an ordinary BR data file.

Filename.SQL is a text file containing the SQL needed to create a CURSOR (set of records), which will be accessed by the program. This file may also contain an SQL template for performing READs and WRITEs to the database. Filename.SQL may optionally point to the CONTEXT ODBC dictionary in lieu of providing IO SQL. In that event, the CONTEXT is used to translate BR FORM statement field positions and formats to dictionary field names. These names are then used to access the database during READ and WRITE operations.