• 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: KVO and bindings question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: KVO and bindings question


  • Subject: Re: KVO and bindings question
  • From: Don Rainwater <email@hidden>
  • Date: Tue, 1 Jun 2004 15:38:17 -0400

Well, in this particular case, my initialize method is only calling NSValueTransformer's setValueTransformer:forName: method for each of the value transformers I've written (I'm up to 3 now). Is there any harm in registering the same value transformer more than once? If so, it looks like I could use valueTransformerForName: to see if the value transformer already exists (returns nil if not). Probably good form anyway.


On Jun 1, 2004, at 3:23 PM, Scott Anguish wrote:


On Jun 1, 2004, at 9:15 AM, Don Rainwater wrote:

This is a fine example of why you should go to the Apple web site for the latest documentation. I was using the on-disk documentation, which says:

"Value transformers are typically registered by an applications delegate, in
response to receiving a[n] applicationDidFinishLaunching: message."

yes... sorry about that.

In the description of +initialize in the documentation for NSObject, it says that the runtime system sends the initialize message to each class, and any class that inherits from it. So I should not have [super initialize] in my initialize method like I would with -init, right?



right.

but, it's not a perfect world. so your initialize method should be smart enough not to barf if it gets called multiple times.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: KVO and bindings question
      • From: Scott Anguish <email@hidden>
References: 
 >Re: KVO and bindings question (From: Don Rainwater <email@hidden>)
 >Re: KVO and bindings question (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: KVO and bindings question
  • Next by Date: Re: Problem with drawer
  • Previous by thread: Re: KVO and bindings question
  • Next by thread: Re: KVO and bindings question
  • Index(es):
    • Date
    • Thread