Skip navigation.
 
mlMy windows don't cascade
FROM : haller
DATE : Mon Jun 02 22:29:00 2008

I have an NSDocument-based application that is still pretty close to the
Xcode template for "Cocoa Document-based application"; i.e. I subclass
NSDocument but not NSWindowController, and I implement -windowNibName
but not -makeWindowControllers.

When I open a new document, it doesn't cascade; it opens with the same
frame as the previous one.

Setting a breakpoint at -[NSWindow cascadeTopLeftFromPoint:] shows that
it is indeed called, from this stack:

  #0  0x94f5d6a4 in -[NSWindow cascadeTopLeftFromPoint:] ()
  #1  0x94f415e6 in -[NSWindowController _windowDidLoad] ()
  #2  0x94edf476 in -[NSWindowController window] ()
  #3  0x94edf376 in -[NSWindowController showWindow:] ()
  #4  0x94edf2b9 in -[NSDocument showWindows] ()
  #5  0x94edd580 in -[NSDocumentController openUntitledDocumentAndDisplay:error:] ()

however, the argument to cascadeTopLeftFromPoint appears to be always
(0,0).  Any idea what could cause this?

Thanks,
  Stefan


--
Stefan Haller
Ableton
http://www.ableton.com/

Related mailsAuthorDate
mlMy windows don't cascade haller Jun 2, 22:29
mlRe: My windows don't cascade haller Jun 3, 18:44
mlRe: My windows don't cascade Boyd Collier Jun 4, 02:40
mlRe: My windows don't cascade Kyle Sluder Jun 4, 05:21
mlRe: My windows don't cascade Boyd Collier Jun 8, 01:17
mlRe: My windows don't cascade Kyle Sluder Jun 8, 06:47