---
title: "setShouldCreateUI:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocumentcontroller/setshouldcreateui:"
---

# setShouldCreateUI:

Sets whether the window controllers of a document should be created when the document is created.

## Declaration

```occ
- (void) setShouldCreateUI:(BOOL) flag;
```

## Discussion

Discussion Sets whether the window controllers (NSWindowController instances) of a document should be created when the document is created. When a window controller is created, it loads the nib file containing the window it manages. Often flag is set to false for scripting or searching operations involving the document’s data.

## See Also

### Deprecated Methods

- [documentForFileName:](appkit/nsdocumentcontroller/documentforfilename:.md)
- [fileExtensionsFromType:](appkit/nsdocumentcontroller/fileextensionsfromtype:.md)
- [fileNamesFromRunningOpenPanel](appkit/nsdocumentcontroller/filenamesfromrunningopenpanel.md)
- [makeUntitledDocumentOfType:](appkit/nsdocumentcontroller/makeuntitleddocumentoftype:.md)
- [makeDocumentWithContentsOfURL:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsofurl:oftype:.md)
- [makeDocumentWithContentsOfFile:ofType:](appkit/nsdocumentcontroller/makedocumentwithcontentsoffile:oftype:.md)
- [openDocumentWithContentsOfFile:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsoffile:display:.md)
- [openDocumentWithContentsOfURL:display:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:.md)
- [openDocumentWithContentsOfURL:display:error:](appkit/nsdocumentcontroller/opendocumentwithcontentsofurl:display:error:.md)
- [openUntitledDocumentOfType:display:](appkit/nsdocumentcontroller/openuntitleddocumentoftype:display:.md)
- [reopenDocumentForURL:withContentsOfURL:error:](appkit/nsdocumentcontroller/reopendocumentforurl:withcontentsofurl:error:.md)
- [shouldCreateUI](appkit/nsdocumentcontroller/shouldcreateui.md)
- [typeFromFileExtension:](appkit/nsdocumentcontroller/typefromfileextension:.md)
