What do you do if you want to open a method? You have several options from the 
4D Design Environment:

- Go to the Explorer window, scroll to find the method name and then 
double-click on it.

- If you have a method window open, and you see the method name you want to 
open in that method window, you can select it and press ⌘K on macOS and Ctrl+K 
on Windows. (Same as right-clicking on the method name and selected “Goto 
definition”.)

- In an open method window, type in the beginning of a method name and press 
the tab key. A popup window is displayed showing the names of all methods that 
match what you have typed. Select one and that method name will be placed in 
method. The select it and press ⌘K. 

Those are the basic ways of opening a method window. Here is a new way. 

Quick Open Method (QOM) is a component that allows you to quickly open methods. 
You can configure it so that pressing a keystroke will open a pop up window 
that allows you to type a method name. Methods with names that begin with what 
is typed are displayed. 

You can press the return key to open the selected method in the Design 
environment. Down arrow key will move you down the list of matching methods. 
Tab key moves you between the method name entry area and the listbox below. 
Escape key closes the window. Since it uses a “pop up” window type you can also 
click anywhere outside the QOM window and it will close. 

QOM was built with 4D v17 and uses the Form command, dot notation and 
collections, so it won’t work with previous versions of 4D. And you need to 
have dot notation turned on in the host database for the component to function. 

The component has 3 shared methods. Each has comments in the “Comments” tab in 
the 4D Method Explorer indicating what the command does and parameters. The QOM 
OPEN WINDOW method is used to open this popup window.

Basically you want to create a method in the host database that will be used by 
the ON EVENT CALL command. Below is an example of the host database method that 
responds to ⌘K:

If ((Modifiers=(Command key mask+Option key mask)) & (KeyCode=251))
          // remove the trigger keystroke from event queue
        FILTER EVENT

          // open the Quick Open Method popup window
        QOM OPEN WINDOW 
End if 

Cannon Smith posted a feature request on 4D Forums for something like this to 
be built into the 4D Method Editor. Other IDEs have this feature, I think we 
should have it too. Go vote for this feature:

http://forums.4d.com/Post/EN/28659202/3/29834633#29834633

But until 4D includes this feature in the method editor, the QOM component can 
help provide this feature.

https://www.dropbox.com/s/htp5rdoz0g7k4n5/QOM%20v1.0.zip?dl=1

A Read Me file with details about QOM is included in the download. 

Tim

*****************************************
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*****************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to