• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sanity Check
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sanity Check


  • Subject: Re: Sanity Check
  • From: Dave DeLong <email@hidden>
  • Date: Wed, 07 Jul 2010 14:10:15 -0600

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, email@hidden 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Sanity Check (From: email@hidden)

  • Prev by Date: Sanity Check
  • Next by Date: Restricting control characters in an NSSearchField/NSTextField
  • Previous by thread: Sanity Check
  • Next by thread: Re: Sanity Check
  • Index(es):
    • Date
    • Thread