FetchTaggedValue Method
The FetchTaggedValue method returns the TaggedValue associated with the supplied tag name or row number.
If it is a ClassSource (see
ClassSource Class) and the specified tag name is not found in the local array, the method will search the corresponding TaggedValues array in superclasses for the first instance of the tag; the name of the superclass is returned in the classname parameter. In all other circumstances only the local TaggedValues array is searched.
This method has the following syntax:
TaggedValue = CompSource.FetchTaggedValue(tag = varchar(256) | row = integer,
classname = Byref(varchar(32)), item = Object)
This method has the following variable and parameters:
CompSource
Specifies the frame, procedure, or user class
tag
(Either this parameter or row is required.) (Required) Specifies the name of the tag to be stored or accessed in the TaggedValues array.
If an Item parameter is supplied, the tag name must be suffixed by a subtag, delimited from the main tag name by the "#" character. This subtag is used to uniquely identify and access the object item being stored. If the specified subtag has already been used, the supplied item will replace whatever object was previously stored using that subtag; if the supplied item is a null, the subtag entry will be deleted.
For example, if a tagged value with tag name "test" has two objects (items) stored, the first with subtag "one", the second with subtag "two", the following code retrieves the second object:
myAppSource.FetchTaggedValue(tag='test#two', item=Byref(myseconditem));
Note: The "&" character is reserved. Use of either "#" and "&" within tag or subtag names leads to unpredictable results.
For more information about how multiple items may be stored for a tagged value, see the SetTaggedValue method (see
RemoveTaggedValue Method).
row
(Either this parameter or tag is required.) Specifies the row number in the TaggedValues array.
classname
Specifies the name of the class Byref. If the object calling this method is a ClassSource, this string is set to the class name of the ClassSource to which the identified TaggedValue actually belongs (this may be a superclass of the caller).
item
Specifies an object to be stored as one of the KeyedItems in the tagged value being created or changed.
This method returns a TaggedValue, or NULL if the entry for this tag or index is not present.