Begin forwarded message:

From: k...@highrolls.net
Date: July 7, 2010 2:24:18 PM MDT
To: Dave DeLong <davedel...@me.com>
Subject: Re: Sanity Check

Ok that was my concern. I am not assigning [[SewAndColorController alloc] init...] into a variable ergo I thought I should [self retain] and the release it when the panel is closed.

So question ... if I do not assign [[SewAndColorController alloc] init...] into a variable does that present any problem?


On Jul 7, 2010, at 2:10 PM, Dave DeLong wrote:

Why are you retaining self? Other than that, yes it looks fine (assuming you're assigning the results of [[SewAndColorController alloc] init...] into a variable).

Dave

On Jul 7, 2010, at 2:07 PM, k...@highrolls.net wrote:

Does this code make sense? Where

[[ SewAndColorController alloc] initWithWindowNibName:@"nibName"]

is called from another view action?


@interface SewAndColorController : NSWindowController {

        NSPanel *m_panel;
}

@end

#import "SewAndColorController.h"

@implementation SewAndColorController

- (id) initWithWindowNibName:(NSString*)windowNibName
{
        self = [super initWithWindowNibName:windowNibName];
        if (self != nil)
        {
                [self retain];
                m_panel = [self window];
                [m_panel setDelegate:self];             
                [m_panel makeKeyAndOrderFront:self];
        }
        return self;
}
@end



_______________________________________________

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/davedelong%40me.com

This email sent to davedel...@me.com

_______________________________________________

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/koko%40highrolls.net

This email sent to k...@highrolls.net


_______________________________________________

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