arcticPigs release V1.0 helpefiles |
Expando objects |
All the arcticPigs viewer classes are expando objects with the exception of all the collection classes. This means you can add your own variables to the arcticPigs objects. This could be very useful for event handling where you might want to add data to a group object so that you can access this data in the onMouseOver event for example.
According to the official JScript standard, variable and function names should be treated case sensitive. However this standard has never been enforced in the browser scripting environment. For that reason the core methods and properties of the arcticPigs classes are not case sensitive. If you add properties to the class however, these will be treated case sensitive.
hBigGroup = hModel.groups("biggroup");
hBigGroup.alert = "Oh, this is big!";
hBigGroup.ALERT = 100;
This example shows how to add two properties to an arcticPigs group, one string and one number. Because the expando properties are case sensitive, the second assign creates a new property, as opposed to overwriting the contents of the 'alert' property.
Last Updated: 07/03/02 |