KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using the Select Enclosing Block function
PRODUCT: 4D | VERSION: 2003 | PLATFORM: Mac & Win
Published On: September 29, 2006

In the Method editor, the Select Enclosing Block function is used to select the “enclosing block” of the code containing the insertion point.

The enclosing block can be defined by:


  • Quotes,

  • Parentheses,

  • A logical structure (If/Else/End if, While/End while, Repeat/Until, Case of/End case) or

  • Braces.


If a block of text is already selected, the function selects the enclosing block of the next highest level and so on, until the entire method is selected.

If the insertion point is placed in an If or Else type structure, the enclosing block will be the one containing, respectively, the If or Else statement.

Here are instructions to use the Select Enclosing Block function:
1. In Design mode, open an existing method in the Method editor.
2. Place the insertion point between an enclosing block of code.
3. Right Click (Windows) or Control + Click (Mac OS) to display the contextual menu.
4. Choose Select Enclosing Block from the menu.