FormFix v6.0 for .NET - Updated
WriteDataItem Event (FormModel)



Accusoft.FormFixSdk Namespace > FormModel Class : WriteDataItem Event
An event for writing a data item to the persistent storage.
Syntax
'Declaration
 
Public Event WriteDataItem As DataItemEventHandler
'Usage
 
Dim instance As FormModel
Dim handler As DataItemEventHandler
 
AddHandler instance.WriteDataItem, handler
public event DataItemEventHandler WriteDataItem
public:
event DataItemEventHandler^ WriteDataItem
Event Data

The event handler receives an argument of type DataItemEventArgs containing data related to this event. The following DataItemEventArgs properties provide information specific to this event.

PropertyDescription
The content of the data item to read or write.  
The type of the data item to read or write.  
Remarks

This object uses this event to write a data item to the persistent storage. This only happens when this object was unable to read the data item that it desired or because this object reconstructed the data item.

This object may be unable to read the data item for the following reasons:

  • This object had not previously created and written the data item.
  • The ReadDataItem event handler did not load the data item.
  • The ReadDataItem event does not have an event handler.

This object may reconstruct the data item for the for the following reasons:

  • The FormModel checksum changed.
  • The data item is a different version than this toolkit.
  • The data item is corrupted.

The event handler should save the data item content (as specified by Content) to persistent storage and also associate the type of the data item (as specified by Type) with the content in persistent storage.

Note: Users of FormFix are encouraged to implement handlers for this event and the ReadDataItem event in order to maximize FormFix's built-in optimizations. These events write and read meta-data (data items) about the FormModel. This data is produced when FormFix analyzes the form image for the first time or when FormFix has to reconstruct the data items for one of the reasons described above. If these event handlers are correctly implemented, then FormFix may be able to skip the step of analyzing the form image before the FormModel can be used in identification.

See Also