Introduction
ObjectTools is a 4th Dimension plug-in which provides a set of routines that allow you to create objects: a single entity in which you can store and retrieve any amount of data of differing types.
While similar to 4D BLOBs and other plug-ins, ObjectTools has several important advantages:
- Objects store data as named items – Finally you are freed from the drudgery of using numeric offsets to store and retrieve data. With objects, you store and retrieve data as distinct items using a 255-character name.
- Objects are random access – Whereas in practical terms BLOBs must be written and read in the same order, with objects you can store and retrieve data items in any order.
- Objects are modifiable – You can replace, delete or copy an existing data item without recreating the entire object.
- Objects can be stored in arrays – Because objects are represented by a Longint handle, you can create arrays of objects. This ability makes objects the “perfect” tool for interprocess messaging.
- Objects can store and retrieve complete records with one call – This allows you to implement a kind of record-level undo.
- Arrays within objects are directly accessible – Once stored in an object, you can get the size of an array and directly access any given element, allowing you to iterate over an array within an object.
- Objects can be embedded in objects – You can store objects within objects and directly access embedded items, thus allowing you to easily model complex hierarchical data structures.
- Objects reveal their structure – ObjectTools has a full suite of routines that let you know everything about the structure of an object. In fact, ObjectTools ships with a sophisticated visual object editor that uses these routines to create, examine and modify the contents of any object.

