---
title: "updateWindowsItem(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsapplication/updatewindowsitem(_:)"
---

# updateWindowsItem(_:)

Updates the Window menu item for a given window to reflect the edited status of that window.

## Declaration

```swift
func updateWindowsItem(_ win: NSWindow)
```

## Parameters

- `win`: The window whose menu item is to be updated.

## Discussion

Discussion You rarely need to invoke this method because it is invoked automatically when the edit status of an NSWindow object is set.

## See Also

### Related Documentation

- [isDocumentEdited](appkit/nswindow/isdocumentedited.md)

### Managing the Window Menu

- [windowsMenu](appkit/nsapplication/windowsmenu.md)
- [addWindowsItem(_:title:filename:)](appkit/nsapplication/addwindowsitem(_:title:filename:).md)
- [changeWindowsItem(_:title:filename:)](appkit/nsapplication/changewindowsitem(_:title:filename:).md)
- [removeWindowsItem(_:)](appkit/nsapplication/removewindowsitem(_:).md)
