December 21, 2020 Andrew

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

We present a summary of the main enhancements for Fat Client & the IDE in Omnis Studio 10.2 – this is the First 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: github.com/OmnisStudio

Token Entry Field

This is a brand new window control for the Fat client (desktop apps) that allows the entry of a delimited list of tokens, similar to the “To:” field in macOS Mail or gmail web interface for the entry of email addresses; you can type the first few characters of a name or email address and select one from the list. When you create or select a token i is treated as a single object which you can select and drag to another field, for example, or click on the “x” button to delete it.

  • The $dataname for a Token entry is a character variable, e.g. a comma-separated string of email addresses

The following is new example library in the ‘Samples’ section of the Hub in the Studio Browser; you can see how Token entry fields work and you can examine the code in the library and re-use it in your own applications.

Token entry field

Valid tokens for the new Token entry field are specified by either:-

  • a list
  • a PCRE2 regular expression
  • or both, if token matches regular expression, the field searches the list

Tokens can also be supplied as:-

  • Display text<token value>
    • “Display text” is displayed in the control
    • “token value” is the valid token value
  • The $gettokens method can be used to parse the text
    • Returns a list of tokens
    • Optionally excluding display string

Breadcrumb Control

The animated Breadcrumb control (for fat client) can be used to display a hierarchy in your app, to provide a better UX for end users – as you drill into options, the sections are animated out to the right, and when you click higher options the lower options collapse back.

Breadcrumb control

The Breadcrumb control can be displayed with rounded or pointed ends / arrows (as shown here), or as a text hierarchy with a Pipe character separating options (similar to a web-like breadcrumb); there is a new example library for Breadcrumb in the Hub in the Studio Browser.

Checkboxes and Radio Buttons

Checkboxes and Radio buttons have had a major overhaul with an updated appearance and animated effects to improve the UX, plus check boxes can be horizontal to emulate a slider switch, plus the ‘on’ state for check boxes and radio buttons can be shown as a “tick” (check mark) or cross; there is a new example library for Checkboxes and Radio buttons in the Hub in the Studio Browser.

New styles are set using some new constants for $buttonstyle:-

  • kCheckBoxHorizontal (Specify other text using $text “Checkbox,Other text”
  • kCheckRadioTickMark (Check mark), kCheckRadioCrossMark (Cross mark)
  • Also there are additional color and icon properties

Check box and Radio button

Tab Strip

There is a new vertical mode for the Tab strip control and the current or highlighted tab can be shown with an animated line, a dot, or rounded tab; there is a new example library for the Tab Strip in the Hub in the Studio Browser.

Vertical tabs

  • The new mode for Tab Strip is set in $squaremode, and is a kTabStripAnim… constant.

Complex Grid Enhancements

The Complex grid for the fat client can have a scrollable footer section, implemented via some new properties:

  • $showhorzfooter, $horzfooterborder, $horzfooterfillcolor, $horzfooterheight, $horzfooterlinestyle

Complex grid footer

In addition, the Complex grid can now have slide-out columns, whereby the left-most and right-most column can slide out (they are hidden by default) to reveal more content, implemented via a new property $slideouttype, which can be set to a kGridSlideOutType… constant, e.g. kGridSlideOutTypeLeftRight, and a new method $slideoutcolumn can hide or show the relevant column for a single row.

Complex grid can have variable height rows whereby rows can be resized individually using the mouse, or using the method $setrowheight(), and you can animate the change in height; there is a new example library for the Complex grid in the Hub in the Studio Browser.

Side Panels

Container controls, such as a Page pane, can behave like a Side Panel, that can slide out from the left or right side of a window. Specifically, this new feature applies to controls with $edgefloat kEFposnLeftToolBar or kEFposnRightToolbar.  The $sidepanelmode property of the control can be set to a kSidePanelMode… constant. A side panel can be shown and hidden using the pointer or a new method $showpanel which could be placed on a button; there is a new example library for Side Panels in the ‘Samples’ section of the Hub in the Studio Browser.

Toast Messages

A ‘toast message’ is a brief transient message that pops up on the end users’ screen, which does not interrupt the UI flow (the new toasts in Omnis are NOT system notifications, but support for notifications is being developed for a future  release. You can show toast messages via the current instance, so $cinst.$showtoast() where you can specify:-

  • The title and message text
  • The style and position

Toast messages

There is a new example library for Toast Messages in the Hub in the Studio Browser.

Regular Expressions

Regular expressions in Studio 10.2 are more comprehensive with support for Perl Compatible Regular Expressions version 2 (PCRE2 for short), so you can create better or more efficient searches. This can be used in IDE searches, and in your code, using the rxpos() function.

The rxpos() function can capture groups when using PCRE2:-

  • New optional captureRow parameter
  • Receives the captured groups (sub-expressions in  parentheses)
    • A column for each captured group

Calculate cString as “2017-01-02”
Do rxpos(“^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$”,cString,0,0,cLen,cRow) Returns cOffset

Calculate cString as “hey_test_ho”
Do rxpos(“(hey|ho)_test_(ho|hey)”,cString,0,0,cLen,cRow) Returns cOffset

PCRE2 examples

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: omnis.net/developers/resources/onlinedocs

And look out for Part 2 of our summary of enhancements in Omnis Studio 10.2…

, , , ,