• 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: Can a value transformer get its own registration name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can a value transformer get its own registration name?


  • Subject: Re: Can a value transformer get its own registration name?
  • From: Jim Correia <email@hidden>
  • Date: Thu, 12 Apr 2007 13:58:32 -0400

On Apr 12, 2007, at 1:33 PM, Bill Cheeseman wrote:

Of course I could do the same thing with multiple transformer subclasses or,
as you pointed out, with a single subclass with a registered name iVar to
use in the if-else chain. To my mind, the "generalized" subclass approach
based on registered names and pointer comparisons is simpler to implement,
both because I only need to write one subclass and I don't need to mess with
iVars, -initWith... methods and all that. I just use the registration naming
facility that NSValueTransformer already provides.

That's where we disagree. You only have to write one subclass. It it just a matter of how you tell the instance how to do its work.


It is much easier, and straight forward, for an instance to have those parameters directly available via iVars.

Trying to encode these in the registration name is not the way to go, IMO. Especially given the considerations previously posted.

Jim

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Can a value transformer get its own registration name?
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: Can a value transformer get its own registration name? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Can a value transformer get its own registration name?
  • Next by Date: hey, who's enabling my window's close button?
  • Previous by thread: Re: Can a value transformer get its own registration name?
  • Next by thread: Re: Can a value transformer get its own registration name?
  • Index(es):
    • Date
    • Thread