Error getting tags :
error 404Error getting tags :
error 404 selection | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
selection
Basics
Expander triangle
Type
Keyword
Syntax
the selection selection()
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
The selection is a reference to the currently selected text.
Examples

put empty into the selection -- deletes the selection

Additional Comments
Expander triangle

Use the selection keyword to get the currently selected text or to replace the selection.

Comments:

Certain commands--in particular, the cut and copy commands--operate on the selected text.

Note: The selectionkeyword is implemented internally as a function and appears in the functionNames. However, unlike most functions, the selection lets you put things into it, and behaves like a container rather than a function.

User Comments
Expander triangle
User thumbnail
Peter Brigham
StarStarStarStarStar
Jun 29, 2009
To clarify the note at the end of the entry:

put the selection into myVar

puts the currently selected text into myVar, so in this context "the selection" is equivalent to "the selectedText." However, you can also write:

put "whatever" into the selection

and the string "whatever" will replace the text that is currently selected, so in this context "the selection" acts like "the selectedChunk."