A command that sets one or more attributes or relationships to one or more values.
- macOS 10.0+
An instance of
NSSet sets one or more attributes or relationships to one or more values; for example, it may set the (x, y) coordinates for a window’s position or set the name of a document.
NSSet is part of Cocoa’s built-in scripting support. It works automatically to support the
set command through key-value coding. Most applications don’t need to subclass
NSSet or call its methods.
NSSet uses available scripting class descriptions to determine whether it should set a value for an attribute (or property), or set a value for all elements (to-many objects). For the latter, it invokes
replace; for the former, it invokes
set (or, if the receiver overrides
take, it invokes that method, to support backward binary compatibility.)