Re: My windows don't cascade
Re: My windows don't cascade
- Subject: Re: My windows don't cascade
- From: Boyd Collier <email@hidden>
- Date: Tue, 3 Jun 2008 17:40:17 -0700
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.
Apple's documentation,
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
commented out
[theWindow makeKeyAndOrderFront:nil];
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
windowControllerDidLoadNib: method.
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... ??
Boyd
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
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.
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.
--
Stefan Haller
Ableton
http://www.ableton.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden