<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSComboBoxCell/selectItem(withObjectValue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSComboBoxCell(im)selectItemWithObjectValue:"
  },
  "title" : "selectItem(withObjectValue:)"
}
-->

# selectItem(withObjectValue:)

Selects the first pop-up list item that corresponds to the specified object.

```
func selectItem(withObjectValue object: Any?)
```

## Parameters

`object`

The object for which to select the corresponding pop-up list item. Objects are considered equal if they have the same id or if `isEqual:` returns <doc://com.apple.documentation/documentation/Swift/true>.

## Discussion

This method logs a warning if [`usesDataSource`](/documentation/AppKit/NSComboBoxCell/usesDataSource) is <doc://com.apple.documentation/documentation/Swift/true>. Posts an [`selectionDidChangeNotification`](/documentation/AppKit/NSComboBox/selectionDidChangeNotification) to the default notification center if the selection does in fact change. Note that this method doesn’t alter the contents of the combo box cell’s text field.

## See Also

[`objectValue`](/documentation/AppKit/NSControl/objectValue)

The value of the receiver’s cell as an Objective-C object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)