Inserts an object in the collection specified by the passed key.
SDK
- macOS 10.2+
Framework
- Foundation
Declaration
func insertValue(_ value: Any, inPropertyWithKey key: String)
Discussion
The method insert
is used if it exists. Otherwise, raises an NSUndefined
. This is part of Cocoa’s scripting support for inserting newly-created objects into containers without explicitly specifying a location.