Link:http://output.to/sideway/default.asp?qno=180500006 Script, Scripting Language, VBScript elements, Server-Side VBScript Object Element VBScript Object ElementsUnlike a procedure, an Object is a wrapper of things. In general, things inside an Object are always considered as the element of an Object. Although variables, Subs, and Functions used inside an Object have the same properties, and scope and lifetime, the variables, Subs, and Functions must be accessed through the Object wrapper. In order to hide information and data of things behind an Object, two typical elements, Method and Property, are used to manipulate an Object. Besides, two additional elements, Collection and Event, are also added to increase the functionality of an Object. MethodA Methoud is usually defined as an action that an Object can perform. A Method is actually an embedded function or procedure inside the object used to manipulate the actions or behaviors of an Object. A Method can be Private procedures for internal used by the Object only or Public functions that can be accessed or operated by external assignment also. For example, strVar =objObject.MethodName(strVar), objObject.MethodName(strVar). PropertyA Property is usually defined as an attribute, or an aspect of the behavior of an Object. A Property is basically an embedded function or procedure inside an Object used to manipulate the data or parameters of an Object. In fact, Property is always used to manipulate the variable of an Object. For example, strMyVar = objObject.Property="This is a string variant" CollectionA Collection is a set of ordered things that do not have to be of the same data type. A Collection is a flexiable array with the index number of an item element is updated when an item element is added or removed. The indexed number of the elements of a Collection usually begins at 1. However the indexed number of a Collection Array may begins at 0. EventIn general, an Event is a trigger action due to the status change caused by user actions, applications or the operating system. Sometimes, an Event is also refered to an Event response, that is an associated routine of which triggered by an Event action. Predefined ElementsSome typical predefined Elements are
|
Sideway BICK Blog 06/05 |