FormElement |
|
|
FormData FormDataInfo IsFormElement OwningForm SetFormData |
Class FormElement defines no new attributes.
Fields
No fields are defined by FormElement or any of its superclasses.
Instance template
Class FormElement cannot be instantiated.
Class definition
Define Class FormElement; mixes in with Object; // A form element is an object that looks different on each card, even though it is in the form. // An example is a text field. The text and text styles are stored in the card. // This per-card data for elements of the form is called "form data". operation IsFormElement(): Boolean, noMethod; // call to test whether object is capable of being a form element // return true for viewables that store form data on each card // this allows definition of classes where not all instances use form data // the value of this only matters when the object is added to a form // override when defining a class that stores data in cards intrinsic OwningForm(viewable: Viewable): Form; // call to get form that this viewable is an element of; // returns nilObject if viewable does not implement FormElement, // or if viewable is not a form element, or if viewable has no // enclosing form. Otherwise returns enclosing form. // getting form data from the form element operation FormDataInfo(var objectCount: Unsigned; var nonObjectDataSize: Unsigned), noMethod; // called by the card before calling FormData to find out how much data is coming // occasionally called elsewhere to check number of stored objects // override when defining a class that stores data in cards // implementation must handle nil for objectCount and nonObjectDataSize operation FormData(objects: ObjectList; nonObjectData: Pointer), noMethod; // called by the card to get form data to store in the card // objects must be an empty list // nonObjectData must a buffer sized based on the result from FormDataInfo // override when defining a class that stores data in cards // changing the form element based on form data operation SetFormData(objects: ObjectList; nonObjectData: ReadOnlyPointer; nonObjectDataSize: Unsigned), noMethod; // called by the card to set up the form element from data stored in the card // (nilObject, nil, 0) is passed when there was no previous data in the card // otherwise, the data is what was returned from a previous FormData call end class;