Utility components Info
Read/write property intended to allow keeping of a specific application data with the collection. Any VARIANT can be set including objects. For example this can be useful to distinguish between purpose or type of the collections in the application.


object.Info = variable
variable = object.Info

IDL definition:

[propget, id(8), helpstring("property Info")] 
    HRESULT Info([out, retval] VARIANT *pVal);
[propput, id(8), helpstring("property Info")]
    HRESULT Info([in] VARIANT newVal);


object - Previously created VarDictionary object

variable - any application defined value


If coll.Info.Type = "cars" Then
  ' Do something
End If

Suppose coll is a VarDictionary collection passed to this VBScript with an object assigned to the Info property. The assigned object may have Type property that specifies the "type" of the collection contents. Thus the script is able to determine what are the items in the collection.


Info property can be used in many different ways and usage depends entirely on the developer's choice. For example some of the collection content management routines can be attached to the collection itself by assigning an object that contains them. It can be extremely useful when creating scripting host - the hosting application is able to pass to the script collections with additional data attached to them.

Applies to: VarDictionary


newObjects Copyright 2001-2005 newObjects [ ]