---
title: "removeItem(withObjectValue:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscomboboxcell/removeitem(withobjectvalue:)"
---

# removeItem(withObjectValue:)

Removes all occurrences of the specified object from the combo box’s internal item list.

## Declaration

```swift
func removeItem(withObjectValue object: Any)
```

## Parameters

- `object`: The object to remove from the combo box’s internal item list. Objects are considered equal if they have the same id or if isEqual: returns doc://com.apple.documentation/documentation/Swift/true.

## Discussion

Discussion This method logs a warning if usesDataSource is true.

## See Also

### Related Documentation

- [indexOfItem(withObjectValue:)](appkit/nscomboboxcell/indexofitem(withobjectvalue:).md)

### Working with an Internal List

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