Invoked by outline
to return an archived object for item
.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
optional func outlineView(_ outlineView: NSOutline View, persistentObjectForItem item: Any?) -> Any?
Parameters
outlineView
The outline view that sent the message.
item
The item for which to return an archived object.
Return Value
An archived representation of item
. If the item is an archived object, this method may return the item.
Discussion
When the outline view is saving the expanded items, this method is called for each expanded item, to translate the outline view item to an archived object.
Special Considerations
You must implement this method if you are automatically saving expanded items (that is, if autosave
returns true
).