---
title: dataSource
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nscomboboxcell/datasource
---

# dataSource

The object that provides the data displayed in the combo box’s pop-up list.

## Declaration

```swift
unowned(unsafe) var dataSource: (any NSComboBoxCellDataSource)? { get set }
```

## Discussion

Discussion The value of this property should be an object that implements the appropriate methods of the NSComboBoxCellDataSource informal protocol. Note that setting this property doesn’t automatically set usesDataSource to false and in fact logs a warning if usesDataSource is false. If you set this property to an object that doesn’t respond to either numberOfItemsInComboBoxCell: or comboBoxCell:objectValueForItemAtIndex:, a warning is logged if usesDataSource is false. See the class description and the NSComboBoxCellDataSource informal protocol specification for more information on combo box cell data source objects.

## See Also

### Accessing a Data Source

- [usesDataSource](appkit/nscomboboxcell/usesdatasource.md)
