TextOutputStream.Constructor(handle as Integer, type as Integer)
From Xojo Documentation
Constructor
Creates a TextOutputStream instance.
Notes
Type is one of the HandleType class constants and Handle is the appropriate handle type specified by the Type parameter.
The following class constants can be used to specify the optional Type parameter in the constructor.
Class Constant | Description |
---|---|
HandleTypeWin32Handle | A Windows 32 OS handle |
HandleTypeFilePointer | A file pointer. |
HandleTypeFileNumber | A file descriptor. |
HandleTypeMacFileRefNum | A file reference number |
HandleTypeMacFileSpecPointer | An FSSpec. |
For instance, you can use a Declare to open a file with whatever permissions that you wish, and then pass the Handle to a stream object’s constructor.
Sample Code
This example appends the text in TextField1 to the text file that was opened by GetOpenFolderItem: