• 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: Best Way to Handle Properties?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best Way to Handle Properties?


  • Subject: Re: Best Way to Handle Properties?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Wed, 20 Aug 2008 21:31:17 -0700

On Wed, Aug 20, 2008 at 10:42 AM, Dave <email@hidden> wrote:

> Yes, all 56 properties are required for the object to be valid, so in the
> initializer I set the NSString pointers to nil, zeroize the integers and set
> the dataValid flag to FALSE.

Objective-C guarantees that all ivars will be initialized to zero (aka
nil, false, NO, etc.) when you allocate an object. You don't need to
set ivars to zero yourself in the initializer.

-Shawn
_______________________________________________

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

  • Follow-Ups:
    • Re: Best Way to Handle Properties?
      • From: Graham Cox <email@hidden>
References: 
 >Best Way to Handle Properties? (From: Dave <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Ken Thomases <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Dave <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Ken Thomases <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Dave <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Ken Thomases <email@hidden>)
 >Re: Best Way to Handle Properties? (From: Dave <email@hidden>)

  • Prev by Date: Re: NSWindowController, owner, "primary window"...
  • Next by Date: Re: Can't create pointer to custom class
  • Previous by thread: Re: Best Way to Handle Properties?
  • Next by thread: Re: Best Way to Handle Properties?
  • Index(es):
    • Date
    • Thread