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

Re: dynamic binding in initializers


  • Subject: Re: dynamic binding in initializers
  • From: Andy Lee <email@hidden>
  • Date: Fri, 25 Feb 2011 08:13:40 -0500

On Feb 24, 2011, at 10:21 AM, Roland King wrote:
> It seems if I have a method I really don't want to be dynamic, I should call it a class-specific name (which I just did, my internalInit is now internalInit_MyClass, ugly though)

This is the approach I take. Granted it's ugly, but at least it's privately ugly (you aren't uglifying your class's public API), and the name is slightly more intention-revealing ("this code is only for this class"). *Because* the name is ugly, anyone skimming the code can tell it's doing something out of the ordinary.

I hadn't thought of using functions -- good to have an option to consider in the future -- but offhand it seems I'd prefer a method so I have the option of calling super and so that I can use Objective-C syntax for arguments. These are minor considerations though.

--Andy


_______________________________________________

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: 
 >dynamic binding in initializers (From: Roland King <email@hidden>)
 >Re: dynamic binding in initializers (From: Dave Zarzycki <email@hidden>)
 >Re: dynamic binding in initializers (From: Roland King <email@hidden>)

  • Prev by Date: original image size is not retained when it is exported as PDF using CGImageDestinationRef
  • Next by Date: Re: Help Mixing Objective-C & Objective-C++
  • Previous by thread: Re: dynamic binding in initializers
  • Next by thread: NSRuler for nonlinear measurements
  • Index(es):
    • Date
    • Thread