Instance Property


The URL of the file the window represents.


@property(copy) NSURL *representedURL;


When the URL specifies a path, the window shows an icon in its title bar, as described in Table 1.

Table 1

Title bar document icon display

File path

Document icon



Specifies a nonexistent file


Specifies an existent file

Specific for the file’s type

You can customize the file icon in the title bar with the following code:

[[<window> standardWindowButton:NSWindowDocumentIconButton] setImage:<image>]

When the URL identifies an existing file, the window’s title offers a pop-up menu showing the path components of the URL. (The user displays this menu by Command-clicking the title.) The behavior and contents of this menu can be controlled with window:shouldPopUpDocumentPathMenu:.

See Also

Managing Titles


The string that appears in the title bar of the window or the path to the represented file.


A value that indicates the visibility of the window’s title and title bar buttons.

- setTitleWithRepresentedFilename:

Sets a given path as the window’s title, formatting it as a file-system path, and records this path as the window’s associated filename using representedFilename.


The path to the file of the window’s represented file.