JVCL Help:GetUniqueCtxName
JVCL Help: GetUniqueCtxName function
Search in JVCL Help
Search in all projectsSummary
Returns a unique name within a specified context list.
Pascal
run\JvDataProvider.pas
functionGetUniqueCtxName(Contexts: IJvDataContexts; Prefix: string): string;
Parameters
Parameters | Description |
Contexts: IJvDataContexts | Context list for which the name must be unique. |
Prefix: string | Prefix of the context name to use. |
Description
GetUniqueCtxName will determine and return a unique name within the specified context list, using the specified prefix string and an integer value.
The function will iterate over the contexts in the list and determine that largest integer value that follows each context starting with the specified prefix. The new name will be the prefix followed by the string representation of (1 + the largest value found). If no contexts are found starting with that prefix or not followed by an integer value, the resulting name will be the prefix followed by '1'.
This function is often used by implementers of the IJvDataContextsManager.New method to generate a new context with a unique name.
See Also
IJvDataContext.Name, IJvDataContextsManager.New
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