Re: Window cascading

2012-05-09 Thread ecir hana
On Wed, May 9, 2012 at 5:08 AM, Peter Ammon pam...@apple.com wrote: Hope that helps, It did. Thanks! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Window cascading

2012-05-08 Thread ecir hana
Hello, I create a window like this: id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease]; [window cascadeTopLeftFromPoint:NSMakePoint(20,20)]; but it cascades just vertically - the next

Re: Window cascading

2012-05-08 Thread Richard Somers
On May 8, 2012, at 3:01 AM, ecir hana wrote: I create a window like this: id window = [[[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSTitledWindowMask backing:NSBackingStoreBuffered defer:NO] autorelease]; [window cascadeTopLeftFromPoint:NSMakePoint(20,20)];

Re: Window cascading

2012-05-08 Thread ecir hana
Thank you for the reply! Yes, document-based. However, not sure if it is an issue, but I have my own subclassed window controller. The docs also say that the default for shouldCascadeWindows is YES. I tried to set it to YES in setShouldCascadeWindows:, without luck. I look at the

Re: Window cascading

2012-05-08 Thread Richard Somers
a modern fully functional document based sample application with window cascading working perfectly. You should be able to quickly get the sample project up and running in a few minutes in Xcode 4.2 by validating the project build settings and setting the default SDK. http://www.bignerdranch.com

Re: Window cascading

2012-05-08 Thread ecir hana
for Cocoa Programming For Mac OS X (3rd Edition) and look at Chapter 10_Archiving. This chapter contains a modern fully functional document based sample application with window cascading working perfectly. You should be able to quickly get the sample project up and running in a few minutes

Re: Window cascading

2012-05-08 Thread Peter Ammon
On May 8, 2012, at 2:01 AM, ecir hana ecir.h...@gmail.com wrote: Why's that? Do I have to remember the returned NSPoint and pass it to next cascadeTopLeftFromPoint:? Yes; the usual pattern is: static NSPoint cascadeLoc = {0, 0}; cascadeLoc = [window cascadeTopLeftFromPoint:cascadeLoc]; The