---
title: "tokenFieldCell(_:hasMenuForRepresentedObject:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstokenfieldcelldelegate/tokenfieldcell(_:hasmenuforrepresentedobject:)"
---

# tokenFieldCell(_:hasMenuForRepresentedObject:)

Allows the delegate to specify whether the represented object provides a menu.

## Declaration

```swift
@MainActor optional func tokenFieldCell(_ tokenFieldCell: NSTokenFieldCell, hasMenuForRepresentedObject representedObject: Any) -> Bool
```

## Parameters

- `tokenFieldCell`: The token field cell that sent the message.
- `representedObject`: A represented object of the token field.

## Return Value

Return Value true if the  represented object has a menu, false otherwise.

## Discussion

Discussion By default tokens have no menus.

## See Also

### Managing Menus for Represented Objects

- [tokenFieldCell(_:menuForRepresentedObject:)](appkit/nstokenfieldcelldelegate/tokenfieldcell(_:menuforrepresentedobject:).md)
