Contents

insert(_:)

Creates a new object of the class specified by objectClass and inserts it into the tree controller’s content.

Declaration

@IBAction func insert(_ sender: Any?)

Discussion

The sender is typically the object that invoked this method.

If the receiver is in object mode newObject is called and the returned object is inserted into the collection. If the receiver is in entity mode a new object is created that is appropriate as specified by the entity, and newObject is not used.

Special Considerations

The result of this method is deferred until the next iteration of the run loop so that the error presentation mechanism can provide feedback as a sheet.

See Also

Adding, inserting and removing objects