Contents

changeWindowsItem(_:title:filename:)

Changes the item for a given window in the Window menu to a given string.

Declaration

func changeWindowsItem(_ win: NSWindow, title string: String, filename isFilename: Bool)

Parameters

  • win:

    The window whose title you want to change in the Window menu. If aWindow is not in the Window menu, this method adds it.

  • string:

    The string to display for the window’s menu item. How the string is interpreted is dependent on the value in the isFilename parameter.

  • isFilename:

    If False, aString appears literally in the menu; otherwise, aString is assumed to be a converted pathname with the name of the file preceding the path (the way the NSWindow method Settitlewithrepresentedfilename(_:) shows a title)

See Also

Related Documentation

Managing the Window Menu