Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSEnumeratorMBS class.

NSEnumeratorMBS.allObjects as Variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.8 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns an array of objects the receiver has yet to enumerate.
Example
dim d as new NSDirectoryEnumeratorMBS(SpecialFolder.Desktop)

dim a(-1) as Variant = d.allObjects
dim lines(-1) as string

for each v as Variant in a
lines.Append v
next

MsgBox Join(lines, EndOfLine) // shows all stuff on desktop

Put another way, the array returned by this method does not contain objects that have already been enumerated with previous nextObject messages.
Invoking this method exhausts the enumerator's collection so that subsequent invocations of nextObject return nil.

NSEnumeratorMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

NSEnumeratorMBS.nextObject as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.8 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns the next object from the collection being enumerated.
Example
dim d as new NSDirectoryEnumeratorMBS(SpecialFolder.Desktop)

MsgBox d.nextObject // shows ".DS_Store" or some other file name

The next object from the collection being enumerated, or nil when all objects have been enumerated.

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...