tlaWriteBuffer
Write Non-System Read-Write Buffers

CodeWright® - API Macro - Royalty Free - 2005.01.01 17:15
Send Comments

Purpose

Write Non-System Read-Write Buffers.

Operation

This function writes buffers to disk.

The scope of this function can be set to either All buffers or just the Current buffer.

tlaWriteBuffer will only write a buffer if it is not a system buffer and not a read-only buffer.

Example

tlaWriteBuffer( )
tlaWriteBuffer( "all" )
tlaWriteBuffer( "cur" )

Input Parameters

Parm Name Code Meaning
1 Scope   Write current non-system read-write buffer.
"all" Write all non-system read-write buffers.
"cur" Write current non-system read-write buffer.

Return Codes

Code Message
number tlaWriteBuffer: number buffers written (non system, read write).
-1 tlaWriteBuffer: No buffers loaded.
-1 tlaWriteBuffer: No buffers written (non system, read write).
-1 tlaWriteBuffer: Paramater not null, "all", or "cur".

Reference

This function calls tlaDateTime, tlaError, and tlaEventPrepareToSave.

Compatibility

Current version verified under:

  • CodeWright 7.0c
  • CodeWright 7.5.1
  • CodeWright 7.5.2
  • CodeWright for .NET 7.0

CodeWright for .NET Restriction

The automatic date/time updating is provided by the tlaEventPrepareToSave event handler. Event processing is not available in CodeWright for .NET and as such this function will not automatically update files in that environment. When running under CodeWright for .NET tlaEventPRepareToSave is called directly to invoke this capability. When event handling is added to codeWright for .NET this reqriction will be removed.

Installation

There are three primary methods for installing this macro on your system. Method A uses the tlaMDE tool available for purchase from this website. Method B uses the tlaMacro tool available as a free download from thiswebsite. Method C uses the API Macro... tool provided in every copy of CodeWright.

Method A - tlaMDE - recommended

  • Select the Code button on this page.
  • When the second window opens, select all the text in the text box.
  • Issue Ctl-C (copy).
  • Create a new file in CodeWright.
  • Issue Ctl-V (paste).
  • Issue tlaMDE C (save and compile).

Method B - tlaMacro

  • Select the Code button on this page.
  • When the second window opens, select all the text in the text box for a macro.
  • Issue Ctl-C (copy).
  • Create a new file in CodeWright.
  • Issue Ctl-V (paste).
  • Issue tlaMacro S (save).
  • Repeat this process for each macro in the text box.

Method C - API Macro ...

  • Select the Code button on this page.
  • When the second window opens, select text from the text box for a macro:
    • Do not select the [API Macro ... header line.
    • Select all other lines in the macro.
  • Issue Ctl-C (copy).
  • Open the CodeWright Tools | API Macros... dialog.
  • Press the New button.
  • Select the Edit box.
  • Issue Ctl-V (paste).
  • Double-click on the function name in the header of the macro.
  • Issue Ctl-C (copy).
  • Select the Name box.
  • Issue Ctl-V (paste).
  • Delete the trailing blank from the name.
  • Select the Save button.
  • Select the Close button.
  • Repeat this process for each macro in the text box.

Purchase

tlaTools is a Dynamic Link Library that contains most of the API macros on this website in a single easy to install package. The tlaTools DLL can be purchased by selecting the Buy button on this page.

tlaWriteBuffer is included as a function in tlaTools.

Copyright © 1993-2005 Thom Little Associates, Ltd. revised 2005.01.01 17:15
One Central Square, Keene, NH 03431-3787 phone 603-357-7567