GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Three — Data Types and Operators (continued)
3.20.1 Introduction to Handles
Handles provide a method to reference objects. These objects can be Legato objects, custom-designed objects, or objects from external data sources and systems. Handles offer a means to access complex items such as files, text mapped for editing, file system enumeration information, and word parsing functions.
Legato handles are used to control access to predefined types of objects, such as Basic File or Mapped Text Objects. These handles are managed by the script engine, which means that they function in defined ways. They are also closed and released by the script engine upon a function’s return or the script’s termination, so an explicit statement to close a Legato handle is not necessary. Other handles for Windows items or program-defined objects may be employed, but these are not automatically “cleaned up” by the script engine. It is up to the programmer to properly create, maintain, and release non-Legato objects and their handles.
When operating in an environment where a script remains in memory, such as supporting a menu hook, programmers must be cautious about leaving certain objects open. For example, opening the clipboard and failing to close the handle is exceptionally bad form because the clipboard will not be accessible by any other program until the handle is closed.
Handle variables allow only limited use of operators: assignment (=), logical equality (==), and logical inequality (!=). An uninitiated or an empty handle may be 0 or NULL_HANDLE.
It may be necessary or desirable to access handles for Windows objects or other components. These might include handles to dialog boxes, files, external libraries, and other items. These are accessible through various functions. Handles to external objects are not necessarily recognized or handled by the script engine; therefore, the programmer should exercise care in managing them.
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.