Tips_todo   >   Misc   >   Shortcuts

Shortcuts

Programmers are always looking for faster, quicker, ways to do their work.
This sections gives ideas on things you can do to increase efficiency.

If you have ANY time tricks which save you time with Omnis Studio, be sure to email them to me!

AutoPairs

Autopairs is a freeware extension available for the Mac platform which automatically types a closing bracket, when you type an opening bracket.

Type ( and AutoPairs automatically types the closing bracket ) leaving the insertion point between the brackets.

Autopairs works for the following types of brackets () {} []

After years of manually type the closing brackets, Autopairs will take a bit of getting used to.

If you install it you should try if for at least a week, then decide whether or not it save you time.

Available at http://www.jwwalker.com

Thanks to Greg Olson-Hyde for this tip.

Field List

In a complex window, one with paged panes within paged panes, for example, the Field List window can be invaluable when you need to get to an object that's deeply buried.

Just right-click anywhere on the window to get to its context menu and select "Field List". Then click on the
checkbox by the field you need to get to a voila, you're there!

Thanks to Craig Lewis for this tip.

I find the Field List crucial for windows that have objects set to kEFposClient. Another time it's invaluable is if you inadvertently "lose" a field in a complex grid ... you know the field is there but it has become hopelessly hidden. Go to the field list, click on the checkbox by the missing field in the Field List, then F6 to the Property Manager and set the left and top values to zero, voila the missing field reappears!

Library Class

When you are viewing the library browser items you can use the following shortcut key
combinations in order to show just the type of classes you want to look through

Shift-Ctrl/Cmnd-W = W_indow Classes
Shift-Ctrl/Cmnd-O = O_bject Classes
Shift-Ctrl/Cmnd-R = R_eport Classes

Shift-Ctrl/Cmnd-M = M_enu Classes
Shift-Ctrl/Cmnd-T = T_oolbar Classes

Shift-Ctrl/Cmnd-B = ta_B_le Classes
Shift-Ctrl/Cmnd-F = F_ile Classes
Shift-Ctrl/Cmnd-S = S_chema Classes
Shift-Ctrl/Cmnd-Q = Q_uery Classes ;; This doesn't work in Mac OS X.

Shift-Ctrl/Cmnd-Y = s_Y_stem Classes
Shift-Ctrl/Cmnd-A = A_ll Classes
Shift-Ctrl/Cmnd-J= Task Classes ;; I'm not sure how J relates to task classes.

Shift-Ctrl/Cmnd-I = Remote Forms (think of I-nternet)
Shift-Ctrl/Cmnd-K = Remote Tas_K_s)

Moving Tab Pane Objects

To move objects from one tab to another, selected the objects in one tab either by shift+clicking on the objects, or using Ctrl/Cmnd and dragging a selection rectangle over the objects you want to move.

Once the objects are selected, drag them over the tab which you want to move them to, then press the Alt/Cmnd key to switch to that tab. Drop the objects where you want them.

Selecting Objects in a Container

To select multiple objects in a container object (tab pane, page pane, complex grid, etc.), hold the Ctrl/Cmnd and then drag a selection rectangle over the objects you want to select. After selecting the objects, you can Ctrl/Cmnd+Click to select or deselect other objects in the container field.

Selecting Tab Pane Objects

To select multiple objects in a tab pane (or any container object), hold the Ctrl/Cmnd key and frag a selection rectangle over the objects you want to select after selecting, you can Ctrl/Cmnd+Click to select or deselect objects.

Superclass Method Comments

If you are in a subclass and want to go to a the superclass method which is not overridden (blue text). Click on the method in the methods list, then double-click on the method details in the right pane. Bingo, Omnis will take you to the superclass method!

The first consecutive lines(s) of a superclass method which are commented show up in the subclass. I tend to copy, paste, and comment out the superclass code in the superclass method so that at the subclass method, I can see exactly what the code is in the superclass, without having to pop up to the superclass level.

Example - in the table class superclass method

; set modified for the record to today
; Calculate $cinst.Modified as #D
Calculate $cinst.Modified as #D

(The first 2 lines in the above superclass method will show up in the subclass method.)

When you override a superclass method, the commented lines will show up in the subclass. You can use this to your advantage if there is a superclass method you always want overridden and the same standard template of code used in the subclass. After overriding the superclass method, you can then uncomment the code and modify it as required.

Example - in the table class superclass method
; set Id for the record
; Calculate $cinst.Id as 'ENTER SUBCLASS VALUE'
; OVERRIDE THIS METHOD IN THE SUBCLASS AND ENTER THE VALUE.
OK message {[sys(85)]////Override this method in the subclass table and enter the value.}

If you have a variable you can use %%VariableName and the variable will be automatically added when you override and then uncomment the code.

After you have overridden a superclass method, if you want to look at the superclass method, you can right-click on the subclass method and select Superclass method... from the context menu.

Another way of accomplishing this (a habit I've fallen into) is to place a 'Do inherited' after your ending 'Quit method kTrue'. If you click on the 'Do inherited' and then press F8, Omnis will pop you up to the superclass method.