JavaScript Editor js editor     Web development 

Main Page

This class determines the state of an object. It saves and/or restores object property settings automatically or explicitly.

Category Application

Default Catalog

VisualВ FoxProВ Catalog\FoundationВ Classes\Application



Base Class


Class Library


Parent Class





To use, drop the class on a project or form or, from the Component Gallery Item shortcut menu, select Add to Project or Add to Form. When you add the class to a form, provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classesfor more information on using foundation classes.

Properties, Events, Methods Description

aProperties[1,3] property

The array for saving/restoring properties of oObject.

Default: .F.

lAutomatic property

Specifies whether oObject properties are saved and restored. If this attribute is true (.T.), the _ObjectState object will restore all the attributes you've saved for its target object when the _ObjectState object is destroyed.

Default: .F.


Reference to the target object whose state is being saved.

Default: .NULL.

Restore method

Restores the value of a property for oObject if the value has changed. If tcWhichProperty is not passed, all saved properties of oObject are restored. This method is called with no argument in the _ObjectState.Destroy(В ) event when _ObjectState.lAutomatic is true (.T.).

Syntax: Restore(tcWhichProperty)

Return:В tcSave

Arguments: tcWhichProperty specifies the property to be restored.tcSave specifies the value to be restored.

Save method

Saves the current value of a property for oObject. You can use this instead of the tlSave argument of the Set method.

Syntax: Save(tcProperty, tcTypeValue)

Return: none

Arguments: tcProperty specifies the property being accessed.tcTypeValue specifies the value being saved for tcProperty.

Set method

Sets a property to a new value for oObject.

Syntax: Set(tcProperty, tvValue, tlSave)

Return:В none

Arguments: tcProperty specifies the property to set.tvValue specifies the value tcProperty is to be set to.tlSave specifies whether the current value is retained for later restoration.

See Also

JavaScript Editor js editor     Web development