On Sun, Oct 4, 2009 at 3:23 AM, Eimantas Vaičiūnas
<[email protected]> wrote:
>- (id)init {
>  self = [super initWithWindowNibName:@"BlankDoc"];
>
>  if (self != nil) {
>    NSRect windowFrame = NSMakeRect(100.0f, 800.0f, 500.0f, 500.0f);
>    self.window = [[BlankWindow alloc] initWithContentRect:windowFrame

You're calling -initWithWindowNibName:, giving it a nib with a window
already in it.  Therefore it is unnecessary to create yet another
window.  Just hook up the existing one in the nib to File's Owner's
window outlet.

> *** -[BlankWindow initWithFrame:]: unrecognized selector sent to instance

NSWindow doesn't have an -initWithFrame: method, so this should be an
immediate indication to you that something is very wrong.  Especially
if you haven't written any code that tries to call -initWithFrame: on
an NSWindow.

This is usually an indication of a memory management bug.  After
fixing your first problem, with NSZombieEnabled to see where your
memory bug is.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list ([email protected])

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]

Reply via email to