Re: KVO and bindings question
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.