[Bugs & Requests][Wiki]

5.3. Common Programming Errors

As an aid to prevent redundant frustration, here is a list of common VOS programming errors. If you have encountered an annoying error that you think might plague others (especially newbies), please post it in the VOS discussion forum or mailing list at

5.3.1. Access control

All objects must have access control, and all properties must have property access control. Typically access control on new objects is set from its site's default access control policy. See the API reference documentation and the tutorials for more information about access control.

5.3.2. Uninitialized subproperties

Many MetaObjects (e.g. A3DL) have required subproperties. Applications will assume these properties exist. Make sure you set those subproperties immediately after creating the object. Some MetaObjects have an initialize() method which will set all non-optional subproperties to default values. Applications should catch the exception Vobject::NoSuchObjectError when attempting to access optional subproperties.

5.3.3. Duplicate site links

An object can be a child of only one, local site, and cannot be the child of that or any other site under any name. In other words, this is illegal:

MetaObject* c = site.createMetaObject( "foo", ... );
site.insertChild(-1, "bar", c);