Class

SBElementArray

SBElementArray is subclass of NSMutableArray that manages collections of related SBObject objects. For example, when you ask the Finder for a list of disks, or ask iTunes for a list of playlists, you get the result back as an SBElementArray containing Scripting Bridge objects representing those items.

Overview

SBElementArray defines methods beyond those of NSArray for obtaining individual objects. In addition to object(at:), SBElementArray also defines object(withName:), object(withID:), and object(atLocation:).

Subclassing Notes

The SBElementArray class is not designed for subclassing.

Symbols

Getting Objects in the Array

func object(withName: String)

Returns the object in the array with the given name.

func object(withID: Any)

Returns the object in the array with the given identifier.

func object(atLocation: Any)

Returns the object at the given location in the receiver.

Getting the Referenced Array

func get()

Forces evaluation of the receiver, causing the real object to be returned immediately.

Filtering an Element Array

func array(byApplying: Selector)

Returns a array containing the results of sending the specified message to each object in the receiver.

func array(byApplying: Selector, with: Any)

Returns a array containing the results of sending the specified message to each object in the receiver.