---
title: "insertItem(withObjectValue:at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscomboboxcell/insertitem(withobjectvalue:at:)"
---

# insertItem(withObjectValue:at:)

Inserts an object at the specified location in the internal item list.

## Declaration

```swift
func insertItem(withObjectValue object: Any, at index: Int)
```

## Parameters

- `object`: The object to add to the combo box’s internal item list.
- `index`: The index at which to add the specified object. The previous item at index—along with all following items—is shifted down one slot to make room.

## Discussion

Discussion This method logs a warning if usesDataSource is true.

## See Also

### Working with an Internal List

- [addItems(withObjectValues:)](appkit/nscomboboxcell/additems(withobjectvalues:).md)
- [addItem(withObjectValue:)](appkit/nscomboboxcell/additem(withobjectvalue:).md)
- [objectValues](appkit/nscomboboxcell/objectvalues.md)
- [removeAllItems()](appkit/nscomboboxcell/removeallitems().md)
- [removeItem(at:)](appkit/nscomboboxcell/removeitem(at:).md)
- [removeItem(withObjectValue:)](appkit/nscomboboxcell/removeitem(withobjectvalue:).md)
- [numberOfItems](appkit/nscomboboxcell/numberofitems.md)
