4. System Classes : FieldObject Class
 
Share this page                  
FieldObject Class
Note:  The FieldObject class is used for classification only.
This class is the highest-level object for all form and menu components. It primarily contains the information needed to associate a field with a variable in the 4GL script associated with the field.
Most of the FieldObject attributes are set when you specify the properties of the field in Workbench. If you create frames dynamically, then you must set these attributes from your 4GL script. For an example of dynamic frame creation, see the Programming Guide.
When a frame is executing, you can access the FieldObject attributes of all the fields in your form that were created in Workbench using the field function. This is because the name assigned to a field object on the property sheet refers to the data associated with the field, not the visual object. For dynamic fields created at runtime, use of the field function is not necessary because the reference variable refers to the visual object. In these cases, the GetFieldValue and SetFieldValue methods must be used to access the field's data.
A new FieldObject attribute must be set to the FrameExec object to handle a field's events by queueing them to another frame.
One important attribute defined at the FieldObject level is the HasDataChanged attribute. This indicates whether the data in your form has been changed by user interaction with the form. It can also be set from your 4GL script if, for instance, the data changes because of database access. If the attribute is TRUE for a field on a form, this might be an indication that a database or file access must be done to update the stored version of the data.
Inherits From
Object Class (see Object Class)
Inherited By
ActiveField
AnalogField
BarField
BoxTrim
ButtonField
ChoiceField
ColumnField
CompositeField
ControlButton
DisplayForm
EllipseShape
EntryField
EnumField
ExtObjField
FlexibleForm
FormField
FrameForm
FreeTrim
ImageField
ImageTrim
ListField
ListviewField
MatrixField
MenuBar
MenuButton
MenuField
MenuGroup
MenuItem
MenuList
MenuSeparator
MenuStack
MenuToggle
OptionField
OptionMenu
PaletteField
PopupButton
RadioField
RectangleShape
ScalarField
ScrollBarField
SegmentShape
ShapeField
SliderField
StackField
SubForm
TabBar
TabField
TabFolder
TableField
TabPage
ToggleField
TreeviewField
ViewportField
Attributes
BgColor
ClientText
ControlField
DataType
DefaultString
DefaultValue
FgColor
FullName
HasDataChanged
IsNullable
Name
ParentExec
Script
Methods
GetFieldValue
IsDescendantOf
SetFieldValue
UpdValue
WhichTablefield