How to get OS X to set initial location of NSWindow

cocoa, frame, location, nswindow, objective-c

Solution

`-[NSWindowController setShouldCascadeWindows: YES]` for your window's window controller.

Problem

How do I get OS X to place NSWindows in a reasonable default tiled-like location? Like when I open TextEdit and create 10 documents, I see all the windows as having the same size, but somebody is smart enough to place them offset from each other a bit. I'm sure that the app isn't doing this itself in code. (I need a code-based, not NIB/XIB solution).

Original source