Re: resizing a window before displaying
Re: resizing a window before displaying
- Subject: Re: resizing a window before displaying
- From: Allan Odgaard <email@hidden>
- Date: Wed, 10 Mar 2004 22:43:40 +0100
On 10. Mar 2004, at 15:26, Hua Ying Ling wrote:
Yes but from my experience both NSDocument's
windowControllerDidLoadNib and awakeFromNib are never called if you're
using a custom windowController.
No, that is true, since then the window controller is set as the owner.
I just created a NSWindowController subclasses which loads a Nib and
added:
- (void)windowDidLoad { NSLog(@"%s: %d", _cmd, [[self window]
isVisible]); }
- (void)awakeFromNib { NSLog(@"%s: %d", _cmd, [[self window]
isVisible]); }
Both printed zero, which should mean the window was not visible. If the
resizing must be done by the document, you can always let your window
controller subclass call the document in one of these two methods.
If you're suggesting I set the frame before the nib loads, the problem
I had with setting the frame before the nib loads is the views in the
nib won't resize properly.
No, I would not suggest that, as you have no window before the nib is
loaded ;)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.