NSScriptKeyValueCoding
A collection of methods that provide additional capabilities for working with key-value coding.
Overview
Cocoa scripting takes advantage of key-value coding to get and set information in scriptable objects. The methods in this category provide additional capabilities for working with key-value coding, including getting and setting key values by index in multi-value keys and coercing (or converting) a key value. Additional methods allow the implementer of a scriptable container class to provide fast access to elements that are being referenced by name and unique ID.
Because Cocoa scripting invokes setValue(_:forKey:) and mutableArrayValue(forKey:), changes to model objects made by AppleScript scripts are observable using automatic key-value observing.
Topics
Indexed access
insertValue(_:at:inPropertyWithKey:)removeValue(at:fromPropertyWithKey:)replaceValue(at:inPropertyWithKey:withValue:)value(at:inPropertyWithKey:)
Access by name, key, or ID
insertValue(_:inPropertyWithKey:)value(withName:inPropertyWithKey:)value(withUniqueID:inPropertyWithKey:)
Coercion
Constants
See Also
Related Documentation
- Cocoa Scripting Guide
- Key-Value Coding Programming Guide