On Mon, Apr 6, 2009 at 2:07 AM,  <livinginlosange...@mac.com> wrote:
> In my NSDocument subclass, I am trying to set the main window's frame in the
> windowControllerDidLoadNib: method. For some reason, I can set the width and
> height of the window's frame, but not its origin. Any ideas? I am using the
> setFrame:NSMakeRect(x, y, w, h) display:YES

See -[NSWindowController shouldCascadeWindows].  If you don't override
-[NSDocument makeWindowControllers], NSDocument makes one for you
(using the return value of -windowNibName), and the default behavior
of NSWindowController is, as the documentation says, to automatically
cascade the window.

The solution is to override -makeWindowControllers and create your own
NSWindowController, calling -setShouldCascadeWindows: as appropriate.

--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 arch...@mail-archive.com

Reply via email to