Share via


TextBuffer Class

The TextBuffer class manages arbitrary text file content, and generates and manipulates text.

Syntax

class TextBuffer extends Object

Run On

Called

Methods

  Method Description
Gg957944.pubmethod(en-us,AX.60).gif accept
Gg957944.pubmethod(en-us,AX.60).gif appendText Appends a string to the content of the TextBuffer object.
Gg957944.pubmethod(en-us,AX.60).gif cancelTimeOut Cancels a previous method call to the setTimeOut method. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif decryptOld
Gg957944.pubmethod(en-us,AX.60).gif delete
Gg957944.pubmethod(en-us,AX.60).gif equal Determines whether the specified object is equal to the current one. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif find Searches the TextBuffer object for any occurrence of a string expression.
Gg957944.pubmethod(en-us,AX.60).gif fromClipboard Replaces the content of the TextBuffer object with the content of the clipboard.
Gg957944.pubmethod(en-us,AX.60).gif fromFile Replaces the content of a TextBuffer object with the content of the specified file.
Gg957944.pubmethod(en-us,AX.60).gif getText Retrieves the current content of the TextBuffer object.
Gg957944.pubmethod(en-us,AX.60).gif getTimeOutTimerHandle Returns the timer handle for the object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif getValue
Gg957944.pubmethod(en-us,AX.60).gif handle Retrieves the handle of the class of the object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif ignoreCase
Gg957944.pubmethod(en-us,AX.60).gif insert
Gg957944.pubmethod(en-us,AX.60).gif isNext
Gg957944.pubmethod(en-us,AX.60).gif matchLen Returns the string length of the first match in the TextBuffer object.
Gg957944.pubmethod(en-us,AX.60).gif matchPos Returns the character position of the first occurrence of the search string in the TextBuffer object.
Gg957944.pubmethod(en-us,AX.60).gif new Initializes a new instance of the TextBuffer class. (Overrides the new Method.)
Gg957944.pubmethod(en-us,AX.60).gif nextToken
Gg957944.pubmethod(en-us,AX.60).gif notify Releases the hold on an object that has called the wait method on this object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif notifyAll Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif numLines Retrieves the number of lines in the TextBuffer object.
Gg957944.pubmethod(en-us,AX.60).gif objectOnServer Determines whether the object is on a server. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif owner Returns the instance that owns the object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif regularExpressions
Gg957944.pubmethod(en-us,AX.60).gif removeChar
Gg957944.pubmethod(en-us,AX.60).gif replace
Gg957944.pubmethod(en-us,AX.60).gif setText Sets the content of the TextBuffer object to the specified string, overwriting any existing content.
Gg957944.pubmethod(en-us,AX.60).gif setTimeOut Sets up the scheduled execution of a specified method. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif size
Gg957944.pubmethod(en-us,AX.60).gif subStr Retrieves part of the content of the TextBuffer object (a substring).
Gg957944.pubmethod(en-us,AX.60).gif toClipboard Copies the content of a TextBuffer object to the clipboard.
Gg957944.pubmethod(en-us,AX.60).gif toFile Saves the content of the TextBuffer object to a file.
Gg957944.pubmethod(en-us,AX.60).gif token
Gg957944.pubmethod(en-us,AX.60).gif toString Returns a string that represents the current object. (Overrides the toString Method.)
Gg957944.pubmethod(en-us,AX.60).gif usageCount Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif wait Pauses a process. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif xml Returns an XML string that represents the current object. (Inherited from Object.)
Gg957944.pubmethod(en-us,AX.60).gif Gg957944.static(en-us,AX.60).gif ::strHashKey

Top

Remarks

This class features various string operations, a simple clipboard, and a file interface.

Examples

static void example() 
{ 
    FileIoPermission _perm = new FileIoPermission("myfile.txt",'r'); 
    TextBuffer txtb = new TextBuffer(); 
    _perm.assert(); 
    txtb.fromFile("myfile.txt"); // Read text from file 
    txtb.toClipboard(); // Copy it to the clipboard 
}

Inheritance Hierarchy

Object Class
  TextBuffer Class
    MCRTextBuffer Class