• 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: initializers in Categories?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initializers in Categories?


  • Subject: Re: initializers in Categories?
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 13 Jul 2006 16:02:56 -0400


In this case, Ross, there's nothing to worry about really - especially if you'd create a class method like [NSButton robRossStyleButton] that instantiates a button and configures it to your liking ... Create your (RobRossButtonAdditions) category and fire away.


One caveat -- respect encapsulation. In other words, don't mess with the iVars directly. Instead, you should use available methods such as -setButtonStyle: etc.

--
I.S.


On Jul 13, 2006, at 3:54 PM, Rob Ross wrote:

The only thing I can think of at the moment is perhaps you have a class with a lot of ivars and accessors, and you want to use a group of them in some part of your code, and rather then having to make a lot of [... setXXX] calls, create a convenience initializer that will initialize the set of ivars you care about in one call.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >initializers in Categories? (From: Rob Ross <email@hidden>)
 >Re: initializers in Categories? (From: "A.M." <email@hidden>)
 >Re: initializers in Categories? (From: Rob Ross <email@hidden>)

  • Prev by Date: Re: initializers in Categories?
  • Next by Date: Re: parameter passing from cocoa to AS
  • Previous by thread: Re: initializers in Categories?
  • Next by thread: Re: initializers in Categories?
  • Index(es):
    • Date
    • Thread