JVCL Help:TJvCustomAppStorage.WriteList

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Stores a list of items.


Pascal

 procedureWriteList(constPath: string; constList: TObject; constItemCount: Integer; constOnWriteItem: TJvAppStorageListItemEvent; constOnDeleteItems: TJvAppStorageListDeleteEvent = nil; constItemName: string = cItem);


Parameters

Parameters Description
const Path: string Path (relative to the current path) where the list is to be stored.
const List: TObject Value to store.
const ItemCount: Integer Number of items to store.
const OnWriteItem: TJvAppStorageListItemEvent Method that will write each item to the storage.
const OnDeleteItems: TJvAppStorageListDeleteEvent = nil Method that will remove remaining items from a previous list.
const ItemName: string = cItem Prefix of the sub path for the items.


Description

WriteList stores a list of items in the storage. WriteList is a general purpose method that can store any list by means of the provided write method. The specified write method will be called for each item individually, specifying the list path and the item index to store. The method should write the item (which can be as simple as writing a single value to as complex as writing an entire group of values and/or sub lists). The specified delete method is called to clear out the remaining part of the list that is no longer to be stored (i.e. overwriting a larger list with a smaller list). The method is called only once, specifying the range of items to be removed. The method should then remove said items from the storage.


See Also

TJvCustomAppStorage.ReadList, TJvCustomAppStorage.WriteBinary, TJvCustomAppStorage.WriteDateTime, TJvCustomAppStorage.WriteFloat, TJvCustomAppStorage.WriteInteger, TJvCustomAppStorage.WriteString, TJvCustomAppStorage.WriteStringList


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page