User Tools

Site Tools


whats_new_in_clarion_9.htm
Navigation:  What's New in this Version? >What's new in Clarion 9 Previous pageReturn to chapter overviewNext page

BrowseBox Sorting and Colorization

The ABC template chain has support to enable end-users to sort the Browse data by clicking on a columns header. To enable Browse sorting press the Actions button on the Browse Procedure, and then press the “BrowseBox Behavior” button. Then check (turn on) the “Enable Sort Header” checkbox.  To select the colors to use and choose which columns can be sorted on, press the “Customize BrowseBox Sort Header” button.

File Drivers

All File Drivers now return an error code 90 if any IO exception occurs during file operations.  The stack trace is returned from FILEERROR() and FILEERRORCODE() is set to the number and type of the exception.

SQLite driver

Clarion 9 introduces a new driver for working with SQLite databases.  SQLite is one of the most widely deployed databases in use today. SQLite databases are widely used on both iOS and Android tablets and cell phones.  SQLite databases are useful in any situation where simplicity of administration and easy maintenance are more important than scalability.

The driver introduces a new property; PROP:CreateDB. PROP:CreateDB is a command property that tells the SQL driver to create the SQLite physical database file that is specified in the OWNER attribute of the file. If the database file already exists, this command does nothing.  The existing database file will not be destroyed.

The CREATE statement converts Clarion data types to SQLite Data types using the following table:

Clarion Data Type        SQLite Data Type

STRING                CHAR

CSTRING                VARCHAR

STRING(8);GROUP OVER(STRING);

DATE;TIME                                           DATETIME

DATE        DATE

PDECIMAL                NUMBER

DECIMAL                NUMBER

BYTE                        TINYINT

SHORT                SMALLINT

LONG                        INTEGER

SREAL                FLOAT

REAL                        REAL

BLOB                        CLOB

BLOB,BINARY        BLOB

SQLAnywhere and MSSQL

You can force which ODBC driver the SQLAnywhere and MSSQL drivers use by setting values in the registry key HKEY_LOCAL_MACHINE\Software\SoftVelocity\<;SQL Anywhere|MSSQL>\Dll

to the name of the ODBC driver you want to use.

(For example: 'SQL Server Native Client 10.0' to force the MSQL driver to use the 10.0 ODBC driver).

Btrieve driver

There is a new /NULLPDECIMALS=[ON|OFF] driver string switch added to the Btrieve driver. For PDECIMAL fields Btrieve can store 0 as either +0 or -0.

Normally the file driver stores 0 as -0.  However, Btrieve does not perform OPT symantics if -0 is stored, only if +0 is stored.  The driver has been changed so

that if you have a key defined with the OPT attribute it makes sure to store +0 and not -0.  This change only applies to fields that are key components of OPT keys.

When a PDECIMAL is zero the sign nibble is 0FH.  This does not normally cause any problems.  However, if this field is used as the key component for an OPT key, Btrieve does not consider the field to be NULL and therefore tries to store it in the key.  To avoid this incompatibility the Btrieve driver spots these key components and changes the sign nibble to 0.  For performance reasons the Btrieve driver only does this conversion on PDECIMAL fields that are used as a key component of an OPT key.  A drawback of this is that you cannot later use BUILD(key) to add an OPT key to your file structure using an existing PDECIMAL field.  Instead you have to

copy the records to a new file with the new key structure added.  To avoid this limitation you can add the driver string

/NULLPDECIMAL=ON to the definition of the file.  With this set on the driver makes sure the sign nibble is 0 for all PDECIMAL fields.

PROP:SQLRowSet

All SQL drivers now support PROP:SQLRowSet that can be used to execute SQL statements that return result sets, but are not SELECT or CALL statements.

PROP:NoKeyProject

You can use view{PROP:NoKeyProject} to inform the SQL view engine not to automatically project key components.  
*Note: Using this property makes doing a SET(key);NEXT(view) invalid because the key components are not available

Synchronizer

You can now synchronize SQLite databases with Clarion dictionaries.

Dictionary Editor

The Dictionary Editor adds powerful new search functionality that allows you to search in a selected Dictionary entity , or all of the Dictionary entities (Tables/Columns/Keys/Relations/Pool Fields and Global Fields).

You can invoke the Search dialog from the DCT Explorer toolbar as shown here:

DCTsearch1

The Search allows you to match any property for the entity you are interested in, for example when searching against Tables, you can search Name, Description, Prefix, Driver, Driver Options, Owner, Full Path, Create, Encrypt, Bindable, Creation date and Modified date.

You can also build very complex searches that combine multiple conditions. The screenshot below is an example of a simple multi-condition search

DCTsearch2

- When adding an user defined option to an item in the Dictionary the dialog now defaults to the predefined options to make it less likely to make mistakes when adding options.

- Dictionary validation; there is a new option available to run a check on your Dictionary to ensure the window and report control strings contain valid definitions. Older versions of Clarion could generate certain controls withn the Dictionary file incorrectly, this new option checks that all the control definitions are valid, and both corrects them and writes the changes it made into a log file.

To run a check on your Dictionary, open the .Dct file, then from the Main Menu choose Tools→“Check Data Dictionary Structures”.  You are prompted to confirm the operation as it can take a bit of time to complete on very large dictionary files.

- Clarion 9 offers a new “Advanced” view/layout to the Dictionary Editor.  To switch to the Advanced view go to the Main Menu and choose Tools→Options→Clarion→Dictionary Editor Options,

at the botton of the General tab change the 'Quick View Type' from Simple to “Advanced”.

<;Inset 2 pics of the 2 possible layouts>

ABC (Application Builder Class Library)

SQLexecutor class

Clarion 9 introduces new ABC class support so that you can easily deploy and execute SQL scripts. For example, a Create script like shown below;

CREATE TABLE Courses(

Number INTEGER,

Description CHAR(40),

CompleteDescription CLOB,

CONSTRAINT KeyNumber PRIMARY KEY (Number));

CREATE INDEX KeyDescription ON Courses(Description);

The new class executes SQL code as a series of commands separated by an end of statement marker which you specify.

Any errors encountered executing the script are reported using the passed error handler. In short, you provide an external

file that contains your SQL script and it is parsed and executed.  The SQL code isn't limited to just Create and Alter database scenarios, you can execute any valid SQL code. The new ABC SQL script support is applicable across any SQL driver/backend.

Trigger support extended

You can now add Create and Fetch triggers in the dictionary, and the global embeds of the data app.

The Dictionary Editor Trigger Properties list has been extended to include:

Trigger Type                              ABC Method


Before Record Retrieval                  PreFetch

After Record Retrieval                    PostFetch

Before Create                                    PreCreate

After Create                                              PostCreate

The following FileManager Methods have been added:

PreFetch                      PROCEDURE(SIGNED OpCode, KEY key, STRING positionBuffer, LONG pointer, UNSIGNED recLen, *CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL

PostFetch                    PROCEDURE(SIGNED OpCode, KEY key, STRING positionBuffer, LONG pointer, UNSIGNED recLen, *CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL

PreCreate                    PROCEDURE(*CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL

PostCreate                  PROCEDURE(*CSTRING ErrCode, *CSTRING ErrMsg),BYTE,VIRTUAL

FileCallBackInterface improved

You can now stop a file operation in the FileCallBackInterface.FunctionCalled method without an error being reported to the calling code.  This is done by setting Parameters.StopOperation to TRUE.  Using this feature you can, for example, have all CREATE statements execute SQL code instead of the standard code executed by the file drivers. If ErrCode is not set, then no error code is returned to the calling code.  FunctionDone will not be called if Params.StopOperation is TRUE.

The ABC FileManager class has a new Property StopOperation.  Setting this property to TRUE in PreDelete, PreInsert, or PreUpdate will cause the file operation to stop without reporting an error.  Further, the matching PostXXXX method will not be called.  If ErrCode is not set, then no error code is returned to the calling code.  The matching PostXXXX method will not be called. if SELF.StopOperation is TRUE.

SystemString Class

- A class for working with string/cstring data types. Has 95 methods that mirror the functionality found in the .Net System.String class

ABC Class Library enhancements/extensions

- ABC JsonDataClass to convert clarion variables (string,queue,group,etc.) into a JSON object string representation

- ABC: New option to allow a procedure to run only one instance. NOTE: This work when the 'Call a Procedure' is used from Menu and Buttons and the START a new thread is used.

- Added support to the WindowExtenderClass to ensure only 1 instance of your executable is running. It checks if the process is already running and if so, to give focus to the existing running process

- Added support to the FrameExtension template to start the application only once (ABC and Clarion)

- New method: SortHeaderClassType.GetColumnLabel; returns the label of the column (field name without the prefix)

FileManager

- ABC based applications now display more descriptive error messages when an invalid record declaration is encountered.

SystemString class

A new ABC class;“ SystemString”, that encapsulates commonly used string functionality like base64 conversion, To/FromBlob, splitting a string into parts, and much more. In total the SystemString class has 80+ methods.

RTL (general)

- EVENT:MouseIn and EVENT:MouseOut events are posted when the mouse cursor is entering or leaving the active IMAGE control (IMAGE with scrollbars or the PROP:Active set to TRUE)

- Added a new SYSTEM property; PROP:LowResourcesHook, to hook post-processing of low system resources handling

- New memory heap management system allows better sharing of instances of the RTL and more efficient performance

Template improvements

NEW: ABC: *Added Template Support for user control definition and re use it in other windows.

- Added Single File support to the HTML Report output

- ABC Reports: added option to set the value used for page numbering the first page of the report

- ABC Report Preview: Added “Print Current Page” menu item to the previewer to print the current page

Application Generator

- Application Tree; changing the sort order for the App tree view can now be done using new buttons on the Application Editor toolbar

- Clarion 9 adds “Cancel Generation” and “Cancel Build” buttons on the main IDE toolbar and onto the Application Pad toolbar.

Data Pad improvement

The Data Pad now supports selecting multiple fields from the pad (Columns,LocalData,GlobalData).  All of the selected fields can then be pasted into embedded source code in one paste operation.

IDE Configuration options

Several new customizations are available for the IDE and they can be found from the Main Menu under Tools→Options, select the General category and then choose “Appearance”.

There is a checkbox there to enable “Office-styled Menus and Toolbars”, and once checked (enabled) you can then choose from

8 pre-defined IDE color themes, or you can press the ellipsis button next to the theme droplist to invoke the Appearance Editor, and from there you can define your own custom theme.

There is also another new checkbox under Appearance; “Use Small Icons on Toolbars”, check this box to switch the IDE to use smaller sized icons across the IDE toolbars to free up screen real estate.

Another new option lets you set the fonts and font sizes the IDE uses, and can be found from the main menu under Tools→Options, and then select the “IDE Components Fonts” category.

From here you can choose fonts/sizes for the four main areas of the IDE.  After selecting new font/sizes a restart of the IDE is required.  Keep in mind that setting the font size too large can make some IDE dialogs to be unable to fit all fixed string text.

The Fonts for AppGen and Template dialogs can be set from the Tools→Options→“IDE Components Fonts” dialog, and also be set from the Tools→Application Options dialog. To change the fonts using the “Application Options” dialog scroll to the last Tab; “Dialogs”.  Changes made from here take effect the next time an .APP is opened, and do not require a restart of the IDE.

You can now redefine the shortcut keys used on the main menu in the IDE. From the main menu under Tools→Options, select the “Menu Shortcuts” category. From here you can redefine the shortcut keys used on the main menu in the IDE.

Clarion.exe command line parameters:

/Nologo - suppresses the Clarion splash screen

/Configdir - sets the IDE to use alternate folder location for its configuration files

The /Configdir parameter can be used to name a base folder to store the IDE configuration files. There are two forms supported for /Configdir;

1.   /Configdir=Foldername

2.   /Configdir

Clarion 9 supports using the /ConfigDir parameter without providing any folder name value, if used without any folder name value the IDE settings will be crated and stored within the same folder as Clarion.exe (under the bin folder).

The /ConfigDir parameter is also supported for ResetIDE.exe and ClarionCL.exe, if used without assigning a folder name the Settings folder is expected to reside in the same folder as the executables are located.

IDE Productivity

Image Viewer addin


The new Image Viewer addin allows you to view icon files that contain multiple sizes, and image files (PNG, JPG, GIF, TIFF, etc.) within the IDE.

- The Open File dialogs in the IDE remember which folder was last accessed based upon the type of file being opened (.sln, .app, ,dct, etc.), and then use that folder in subsequent calls to initialize the starting folder the Open File dialog uses for that file type.

- Within the Window Designer when selecting an entry in the Property grid which requires an image file, you can type in the name of the image file, and as long  it can be found via the redirection system, the named file will be used.

- When initializing the Open File dialog from within the Window Designer for the first time, the dialog opens to the first folder where the indicated file type could be found via the redirection system

- When re-opening the Open File dialog in the window formatter the dialog now opens to the last folder where the dialog was last opened

- Within the Source Code Editor there is a new Search option available; “Current Document Directory”, which searches files which are located within the same folder as the “open/active” file is located.

- Clarion 9 adds a new Menu option; Menu→Tools→“Clear Cached ABC Header Files”, which clears the cached ABC header files and subsequently forces a refresh of the ABC headers the next time they are called from the template engine. Used when editing and or extending the ABC class library, or when changing Clarion versions.

- Source Code Editor: The Search dialog has new support to Include/Exclude Read-Only (generated) code blocks.  Useful when you only want to search your own embed code, or when you need to search only within the generated code.

IDE General

- The ABC Reader/Parser now warns you when it can't locate a folder named in the list of folders configured to be scanned for ABC files.

- When you trace the path and order that the redirection system searches for a file, you can now copy the trace results via the Copy button. Useful for tracking down errors in custom redirection files.

- *The redirection system now supports the new built-in macro %libpath% in the Copy section of a redirection file.  This macro evaluates to the folder where the lib file is located when copying the matching dll to the destination folder.

- The default redirection file now includes the folder %libpath%\bin\%configuration% in the Copy section.  This matches the structure implemented by Clarion.NET when you create a lib file for a .NET assembly, thus making it very easy to add .NET assembly projects to your win32 solution

- Clarion 9 adds a new ABC-compliant Win32 “Exe” quick start project type

- The Color Dialog is extended to allow the standard Clarion color equates to be typed directly into the entry field, and as long as a match is found, the color is set accordingly.

- (EE only) The ABC file headers are now cached per IDE session and shared between apps.  Once cached, when opening an App the only work done is to store the cached values into the proper Template symbol constructs.

- New Menu option: Tools→Clear Cached ABCFiles to force the refresh of the ABC headers on demand.

- Clarion 9 adds new style and functionality to the IDE Tabs Docking library; a new “x” close button appears on the tabs as in Firefox or Chrome to allow quickly closing a Tab with a single mouse click.

- Clarion 9 adds both “Copy” and “Select” toolbar buttons to the Errors, Output and Search Pads

- Clarion 9 adds “Expand All Foldings” and “Contract All Foldings” to the right-click popup context menu in the Source Code editor

- There is a new Main Menu option located under Edit→Insert; to insert a generated GUID into the source editor

- The Solution Explorer adds locator support to the Toolbar.

- The Solution Explorer toolbar adds ContractAll/ExpandAll buttons

- The Applications Pad adds locator support to the Toolbar

- The Properties grid has a new “Filtered Locator”.   The Filtered Locator filters the list of properties to only those which match the types input.

- The Window Previewer will inform with a message when an image is not found and the names of all missing images are added to the Error Pad

- Window Previewer: A Window structure with icons that cannot be loaded via redirection opens using replacement icons that indicate that the original image was missing

- The Start Page uses the colors from the IDE theme (selected from Tools→Options→General→Appearance Dialog)

- The Dictionary Changes Pad makes it easier to keep track of the selected error in if an error is found during DCT conversion

- The List formatter dialog stores and restores its last position

Project System

The Project System has a new option so that you can now specify at the project level if warnings should be reported as warnings, treated as errors, or ignored and not reported at all.

New Example Apps

There is a new example app for the SQLite driver based upon the School.app

There is a new example App showing how to use the ABC SQLexecutor scripting class

.

whats_new_in_clarion_9.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1