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

# setWantsNotificationForMarkedText(_:)

Directs the cell’s associated field editor to post text change notifications.

```
func setWantsNotificationForMarkedText(_ flag: Bool)
```

## Parameters

`flag`

If <doc://com.apple.documentation/documentation/Swift/true>, the field editor posts text change notifications (NSTextDidChangeNotification) while editing marked text; if <doc://com.apple.documentation/documentation/Swift/false>, notifications are delayed until the marked text confirmation.

---

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)