Contents Previous Next Subchapters

Getting The Contents Of An Editor Window
Syntax geteditor(caption)
See Also addeditor

Returns a character row vector containing the text currently in the editor window specified by caption , where caption is a character row vector. The new line character (ASCII code 10) is used to separate lines in the return value. The editor window must have been created using the addeditor function.

The following program creates an empty editor window. If you enter information in it and then delete it by using its caption bar, the information will be printed in the command window.

data     = fill(" ", 1, 0)
caption  = "Example: geteditor"
geometry = [100, 100, 400, 400]
callback = "Done"
addeditor(caption, geometry, callback, data)
function Done() begin
     global caption
     data = geteditor(caption)
     write("screen", data)