_NewEnum
Diese Eigenschaft unterstützt die sprachspezifische Standardenumeration.
Signatur
_NewEnum : IUnknown |
Allgemeine Signatur
Fehler
Fehlercode | Beschreibung |
---|---|
1500 | Das Objekt ist nicht mehr gültig. |
Beispiele
// ------------------------------------------------------------ // JScript sample - enumeration of a project's project items. function AllChildrenOfProjectRoot() { objProject = objMapForce.ActiveProject; if ( objProject != null ) { for ( objProjectIter = new Enumerator(objProject); ! objProjectIter.atEnd(); objProjectIter.moveNext() ) { objProjectItem = objProjectIter.item();
// do something with project item here } } } |
// ------------------------------------------------------------ // JScript sample - iterate all project items, depth first. function IterateProjectItemsRec(objProjectItemIter) { while ( ! objProjectItemIter.atEnd() ) { objProjectItem = objProjectItemIter.item(); // do something with project item here
IterateProjectItemsRec( new Enumerator(objProjectItem) );
objProjectItemIter.moveNext(); } } function IterateAllProjectItems() { objProject = objMapForce.ActiveProject; if ( objProject != null ) { IterateProjectItemsRec( new Enumerator(objProject) ); } } |