Re: Need a native guide through "Cannot remove an observer" woods
Re: Need a native guide through "Cannot remove an observer" woods
- Subject: Re: Need a native guide through "Cannot remove an observer" woods
- From: Jack Repenning <email@hidden>
- Date: Mon, 28 Apr 2008 11:49:15 -0700
On Apr 25, 2008, at 7:42 PM, Keary Suska wrote:
on 4/25/08 6:49 PM, email@hidden purportedly said:
- (void) setEntry:(SVNWCEntry *)value
{
[self willChangeValueForKey:@"entry"];
[value retain];
[entry release];
entry = value;
[self didChangeValueForKey:@"entry"];
}
If you haven't turned off automatic KVO notifications, the above is
very
wrong, and could be the source of your problem.
Thanks. I think your hint worked. That is, I'm not sure what you were
suggesting, but I took a guess, and it seems to have worked. But I
still don't quite grasp what's going on, so I'm begging for a touch of
background?
What I did: remove the will/didChange stuff.
What happened: I no longer get the unable-to-remove-observer warning,
nor the subsequent BAD_ACCESS crash.
Don't willChange and didChange merely notify and observers there may
be that change is happening? Why would redundant notification be a
problem (other than perhaps performance, or possibly some obscure
double-entry kind of response to the change, like adding up each value
placed into an integer field)?
-==-
Jack Repenning
email@hidden
Project Owner
SCPlugin
http://scplugin.tigris.org
"Subversion for the rest of OS X"
_______________________________________________
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