December 28, 2020 Andrew

Enhancements in Omnis Studio 10.2 make your app development quicker & easier: Part 2

We present a summary of the main enhancements for Fat Client & the IDE in Omnis Studio 10.2 – this is the Second of two parts.

With the release of Omnis Studio 10.2 (Nov 2020) we added many new features & enhancements in the Fat Client, the IDE, and App Server.  At the launch event for Omnis Studio 10.2, our Principal Omnis engineer, Bob Mitchell, provided an overview of all the enhancements in the Fat Client and design tools in Omnis Studio 10.2, which we summarize here.

Many new example apps are provided for the new controls and features, including the new Token entry field and Breadcrumb control, which are in the ‘Samples’ section of the Hub in the Studio Browser, or on our growing GitHub repository:

SVG support in the Fat Client

Support for SVG icons was added to the JS client for Studio 10.2, but also the Fat Client, so Icon sets can now contain SVG image files, for pushbuttons, tree lists, or wherever PNG icons were supported in previous versions. This enables the use of many open source SVG images (subject to the usual license conditions), or can purchase icon sets from a third-party to add to Omnis Studio:

  • SVG is a very comprehensive format; most SVGs will render in Omnis, but not all, and some SVGs will only render on macOS (check the docs for full compatibility info).
  • For Windows, SVG support requires the Windows 10 Anniversary Update, or above.

SVG icons in an icon set use a simpler naming convention, basically the filename and .svg extension, such as “account-info.svg”, and the SVG file will scale to any size & fit the icon area allowed in the control or client area (so the size info does not need to be added to the file name like previous versions).

Now you can have multiple icon sets, so the $iconset property ($clib.$prefs) has been renamed to $iconsets and now accepts a comma-separated list of icon set folder names to be used for the library.

The Select Icon dialog includes SVG icons in an icon set, including all standard sizes plus a “full page” entry for each SVG; for these, the size list contains the default size extracted from the SVG, plus additional sizes configured in config.json. Plus you can add custom sizes via + button in header of size list, and add them to the config.json.

Select Icon dialog

For fat client, SVG icons can be used with built-in fat client window controls, external component window controls, styled text, menus, toolbars, plus the $backgroundiconid (Windows) and $componenticon properties. (Note the ‘material’ icon set provided for JS client controls cannot be used for fat client controls since they have been themed.)

Method Editor – Code folding

The new Code Folding feature in the Code Editor allows blocks of code to be hidden and represented by an ellipsis token; this can make long methods more compact and readable in the Code Editor window.

Code folding works for construct commands including:

  • If, Else If, Else, For, Repeat, While, Switch, Case, On; parts that can be collapsed are shown with a “-” icon, parts that have been collapsed and therefore can be expanded are shown with “+” disclosure icon. The code in the collapsed part is shown as an ellipsis token – the default is a blue rounded box.

Code Folding

Mouse over the “+” or “-” disclosure icons to highlight the block contents, as shown here in orange:-

Code Folding

Hover over the ellipsis token to show its content in a tooltip:-

Code Folding

Method Editor – Word wrapping

The new Word Wrapping feature in the Code Editor allows long code lines to wrap onto the next line (it is on by default); there is a new option on the View menu. Method lines now have a variable height in the editor.

Word wrapping

Inline comments ignore the inline comment column and shift into the available space. Scrolling occurs in method line units.

Other Method editor enhancements include:-

  • New Colors: for Read-only code background, Resolved and Unresolved names
  • Execution position; the current code line is shown with a ruling line above and below
  • Method tree defaults to including built-in class methods (similar to inherited methods):
    • You can Right-click to override a method.
    • Sets parameters of the new method (those expected by built-in method).
    • Show Built-in Class Methods option on View menu.

Position Assistance – for designing forms and reports

The new Position Assistance feature provides Visual guides that allow you to align and resize objects more easily and accurately; this comprises a combination of colored arrows and dotted lines (as shown here in orange, using a dark IDE theme):-

  • Available for Window, Report and Remote form editors, and is enabled by default.
  • “Show Position Assistance” on the editor context menu.
  • Works with both pointer (mouse) and the keyboard arrow keys: as you move objects they “Snap” (+/-2 pixels) to displayed spacing or alignment when using the mouse.

Position Assistance

Operating System Drag and Drop

Support for dropping objects from the OS (desktop) on to Omnis has been improved and optimized, as follows:-

  • There is a new preference $osdroplimit ($clib.$prefs), that is the maximum number of bytes of dropped data that can be included in pDragValue for evDrop.

Object $dropmode values kAcceptFiles and kAcceptFileData have been replaced with kAcceptOperatingSystem (on conversion to 10.2, they are converted automatically to  kAcceptOperatingSystem).

Plus there is a new object property $osdropflags.

  • Allows constant values: kOSDROPincludeData, kOSDROPfilesOnly, kOSDROPwithoutDataIfOsDropLimitExceeded

With event parameters:-

  • pDragType: kDragOperatingSystem replaces kDragFiles, and kDragFileData is renamed to kDragOperatingSystemData_OBSOLETE, and resolves to the same value as kDragOperatingSystem.
  • pDragValue: new Boolean column isfile, filedata column is now always Binary, filesize column is now a 64-bit integer.

OAUTH2 for OW3 Worker Objects

There is a new OAUTH2 Worker Object which provides support for OAUTH2, the industry-standard protocol for authorization, in the OW3 worker objects including:-

  • Allows OAUTH2 support for HTTP, IMAP, POP3 and SMTP worker objects.

You can use the $authorize() method of the new OAUTH2 worker to obtain the access and refresh tokens. Omnis RESTful port can provide the redirect URI, even in a fat client, non-server version. When authorization has completed, you can set the new $oauth2 property of the HTTP/IMAP/POP3/SMTP workers to the OAUTH2 worker. Tokens and authorization information can be saved in an AES-256 encrypted buffer. See the samples for HTTP, IMAP, POP3 and SMTP in the Hub in the Studio Browser in Studio 10.2.

OW3 “Fire and forget”

There is a new property $alwaysfinish which allows asynchronous requests to continue to completion after the instance containing the OW3 object destructs, a so-called “Fire and forget” call; the property applies to the HTTP, IMAP, SMTP, POP3 and FTP workers. When set to kTrue, for requests invoked with $start():

  • When instance containing worker closes:
    • Worker thread continues in the background
    • The request eventually completes
    • No more notifications are generated
  • Does not apply if you shut down Omnis
  • $alwaysfinish is set to kFalse by default meaning the behavior is unchanged.

OpenAPI 3.0 for RESTful Services

Omnis Studio 10.2 added support for generating OpenAPI 3.0 definitions for your Omnis based web services, which you can use instead of swagger (see the definition here to define an API. RESTful remote tasks can now have a superclass in another library, provided the superclass has no URIs, which allows you to use of framework libraries.

When you select a RESTful service beneath the Web Service Server node in the browser, there are now two pairs of links:

  • OpenAPI Definition, Save OpenAPI to File
  • Swagger Definition, Save Swagger To File

The OpenAPI definition can be retrieved using a similar URL to that used to retrieve a Swagger definition by replacing ‘swagger’ in the URL with ‘openapi’.

MultiProcess Linux Server

The new MultiProcess Server (MPS) for the Linux Headless server provides significant performance improvements in your web & mobile applications, by using a multiprocess server model rather than multithreaded, as in previous versions. The process structure for the MPS is:-

  • One parent comms process
  • One child process per remote task

This ensures better use of preemptive multithreading and multiple CPU cores, which provides better reliability if, for example, a child process crashes then the server continues to run for other remote tasks.

To configure the new MPS, there are new settings in the “server” section of the config.json file on the Linux server:-

  • “multiProcess”: true
  • “maxChildProcesses”: c
  • “maxFreeChildProcesses”: f

Requests needing new child process are queued if maxChildProcesses has been reached.

Deployment Tool

The Deployment Tool was introduced in Studio 10.1 but significantly updated for Studio 10.2; it is available for Windows and macOS, under the Tools menu, then choose Add-ons and Deployment tool…

The Deployment Tool allows you to ‘package’ your Omnis application to distribute your solution to your end users or customers more easily. The tool allows you to add your own Product Icon, application name, version number, and on macOS allows you to Code sign and Notarize your application.

The Deployment Tool

Documentation for Studio 10.2

To read more about all the new features in Omnis Studio 10.2, please refer to the updated Documentation on the Developer Resources website:



, , , ,