JVCL Help:GetUniqueCtxName

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

Search in JVCL Help

 
Search in all projects
 

Summary

Returns a unique name within a specified context list.

run\JvDataProvider.pas


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.

run\JvDataProvider.pas


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.

run\JvDataProvider.pas


See Also

IJvDataContext.Name, IJvDataContextsManager.New

run\JvDataProvider.pas


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