Okay; I'm properly chastised for having originally read the
documentation without as much understanding as I should have. That
was a couple of years ago, and it worked just as it should have until
recently. I've gone back through the documentation and now understand
it much better, and I thank you for your prodding .
You were, of course, correct in saying that I "shouldn't be ordering
the window in the first place" when I have a NSWindowController that's
responsible for showing the window. Leaving out the line [theWindow
makeKeyAndOrderFront:nil]; which appears in Apple's code takes care of
this. That is, when this line is omitted, the windows cascade just as
they should (provided, of course, that "Visible at Launch" is off in
Window Attributes). Perhaps I'll respond to the "Did this document
help you?" note at the bottom of the document page suggesting that a
clarifying detail be added.
Boyd
On Jun 3, 2008, at 8:21 PM, Kyle Sluder wrote:
On Tue, Jun 3, 2008 at 8:40 PM, Boyd Collier
<[EMAIL PROTECTED]> wrote:
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... ??
It is an unwritten assumption that you don't read the documentation in
a vacuum, and that readers don't just copy and paste sample code into
their applications without understanding exactly what it does. It's
"sample" code, not "prebaked" code, after all.
That said, I can't find anything regarding the behavior of
NSWindowController and NSWindow with regards to cascading when the
window has already been shown. But if you have an NSWindowController,
it is responsible for showing the window, and therefore you shouldn't
be ordering in the window in the first place.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]