April 5, 2019 asmith

Finding & Selecting Commands in the New Omnis Code Editor

The new Code Editor in Omnis Studio 10 allows you to enter Omnis code directly into each command line in a method, and when combined with the Code Assistant, and many new keyboard shortcuts, will allow you to write Omnis code quicker and more easily. Existing users will note that the new free-type code editor replaces the ‘point-and-click’ code entry screen, which has been removed in Studio 10. Some developers have asked “where can I see a complete list of commands” in the new Code Editor: the answer is the Code Assistant, which is a general-purpose helper window that ‘pops’ open whenever you need it.
The Code Assistant opens automatically at the insertion point when you type the first letter or 2 of a command name, a command parameter, a variable name, or some notation in the Code Editor, or you can open it at any appropriate point in your code using Ctrl-Space. The code assistant will usually drop down below the insertion point, but may pop up if space below the cursor is limited.

Finding & Entering Commands

So to display a complete list of commands in the new editor, tab to or place the cursor at the beginning of an empty code line in the new Code Editor. Then press Ctrl-Space and the Code Assistant will drop down and will contain a complete list of Commands (depending on the filters set, see below).

Command Filters

The list of commands shown in the Code Assistant is by default only a subset of the commands available in Omnis Studio 10 – there is a filter in place which filters out all the old commands and only shows the most important or useful commands for all new developers. You can view and set the Command filters in the Modify menu in the Method Editor.

The default filter ‘Exclude Old Commands’ hides all the old Datafile, Exchanging data, External, and List (current list) commands. Note you can hide any of these separate subsets (and show the others), or you can select ‘No Filter’ to show all the commands available in Omnis. (Existing users should note that all the commands marked as ‘obsolete’ in previous versions have been removed from Omnis Studio 10.)
When entering a command, as soon as you type the first letter of a command, the list of commands will be further refined, e.g. if you type ‘c’ the command list will only display commands beginning with c. You can omit spaces and ignore case when typing command names, and you can use a combination of Tab or Return and the Up/Down arrow keys to navigate the list and select a command (help is shown for any selected command).

More information

You can find more information about the new Code Editor and Code Assistant on the Omnis Developer portal, in the Studio 10 documentation:
https://developer.omnis.net/documentation/programming/04debug.html#code-editor
And the Command filters are discussed here:
https://developer.omnis.net/documentation/programming/04debug.html#entering-commands

, , ,