A couple of months ago, I too had this problem, but didn't
satisfactorily solve it at that time. As my original posting noted,
this change in behavior happened after upgrading to Leopard and Xcode
3.0. The recent posting by Stefan Haller prompted me to spend some
time trying to figure out why my document-based app didn't cascade
document windows as they were opened. It wasn't a result of the
"Visible at Launch" property being turned on; rather, it seems to have
been a result of code I implemented for horizontal scrolling.
ADC Home > Reference Library > Guides > Cocoa > Text & Fonts > Text
System User Interface Layer Programming Guide for Cocoa >
explains how to put an NSTextView Object into an NSScrollView. I used
the sample code provided there, including Listing 4, "Setting Up a
Horizontal Scroll Bar" in my windowControllerDidLoadNib: method. It
worked as expected except for the windows not cascading. I finally
which appears in Listing 3, and now everything seems to work just as
it should. The only other code that I've used that isn't shown in
Apple's documentation is [self updateView]; at the bottom of my
Although everything now works as I think it should, the fact that it
didn't work correctly when I used Apple's sample code makes me very
nervous; have I misunderstood something, or... ??
On Jun 3, 2008, at 9:44 AM, Stefan Haller wrote:
Stefan Haller <email@hidden> wrote:
I have an NSDocument-based application that is still pretty close
Xcode template for "Cocoa Document-based application"; i.e. I
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
frame as the previous one.
For the archives: It turns out that for some reason the "Visible at
Launch" property of the window was turned on in IB. Turning it off
fixes the problem.