# `GSDialogController beginSheetModalForWindow:completionHandler:`

*Instance Method*

## Declaration

```swift
func beginSheetModal(for window: NSWindow, completionHandler handler: ((NSApplication.ModalResponse) -> Void)? = nil)
```

```swift
func beginSheetModal(for window: NSWindow) async -> NSApplication.ModalResponse
```

```objc
- (void) beginSheetModalForWindow:(NSWindow *) window completionHandler:(void (^)(NSModalResponse returnCode)) handler;
```

```python
beginSheetModalForWindow_completionHandler_(window: NSWindow, returnCode: NSModalResponse, handler)
```

