<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSComboBoxCellDataSource/comboBoxCell(_:objectValueForItemAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSComboBoxCellDataSource(im)comboBoxCell:objectValueForItemAtIndex:"
  },
  "title" : "comboBoxCell(_:objectValueForItemAt:)"
}
-->

# comboBoxCell(_:objectValueForItemAt:)

Returns the object that corresponds to the item at the given index in the combo box cell.

```
optional func comboBoxCell(_ comboBoxCell: NSComboBoxCell, objectValueForItemAt index: Int) -> Any
```

## Parameters

`comboBoxCell`

The combo box cell for which to return the item.

`index`

The index of the item to return.

## Return Value

The object corresponding to the item at the specified index in the given combo box cell.

## Discussion

An `NSComboBoxCell` object uses this method to populate the items displayed in its pop-up list.

> Important:
> While this method is marked as `@optional` in the protocol, **you must implement this method if you are not providing the data for the combo box using using Cocoa bindings**.

## See Also

[`NSComboBoxCellDataSource`](/documentation/AppKit/NSComboBoxCellDataSource)



---

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)