outlineView(_:itemForPersistentObject:)
Invoked by outlineView to return the item for the archived object.
Declaration
@MainActor optional func outlineView(_ outlineView: NSOutlineView, itemForPersistentObject object: Any) -> Any?Parameters
- outlineView:
The outline view that sent the message.
- object:
An archived representation of an item in
outlineView’s data source.
Return Value
The unarchived item corresponding to object. If the item is an archived object, this method may return the object.
Discussion
When the outline view is restoring the saved expanded items, this method is called for each expanded item, to translate the archived object to an outline view item.
Special Considerations
You must implement this method if you are automatically saving expanded items (that is, if autosaveExpandedItems returns true).
See Also
Instance Methods
outlineView(_:acceptDrop:item:childIndex:)outlineView(_:child:ofItem:)outlineView(_:draggingSession:endedAt:operation:)outlineView(_:draggingSession:willBeginAt:forItems:)outlineView(_:isItemExpandable:)outlineView(_:namesOfPromisedFilesDroppedAtDestination:forDraggedItems:)outlineView(_:numberOfChildrenOfItem:)outlineView(_:objectValueFor:byItem:)outlineView(_:pasteboardWriterForItem:)outlineView(_:persistentObjectForItem:)outlineView(_:setObjectValue:for:byItem:)outlineView(_:sortDescriptorsDidChange:)outlineView(_:updateDraggingItemsForDrag:)outlineView(_:validateDrop:proposedItem:proposedChildIndex:)outlineView(_:writeItems:to:)