Den 21:42 1. mars 2012 skrev Quincey Morris
<quinceymor...@rivergatesoftware.com> følgende:

> No, it's nothing to do with the mutability of the parameterInfo object.
>
> The problem is likely caused by lack of KVO compliance of your key path
> either at the <parameterName> or the <attributeName> level, or both. I think
> the console message suggests a place to set a breakpoint. Set one there, and
> then look at [self observationInfo] on the object being deallocated. The
> number and classes of the observers listed should give a clue to where it's
> going wrong.

OK. I haven't thought of KVO-compliance at the <parameterName> level
because no values can change at this level. Only the controller's
parameterInfo property can change, by replacing it. That's what I
meant by calling the parameterInfo object immutable. No property
values can change for one instance of PBH_ParameterInfo class. But I
have seen some suggestions on the web (in response to others with
similar problems), that I must explicitly set each property to nil in
a KVO-compliant manner in my dealloc method. I didn't think the
problem could be at this level, but I might try that.

> Incidentally, if '[controller valueForKeyPath:
> @"parameterInfo.<parameterName>]' were invoked, what object would your
> controller return?

It would return an (immutable) NSDictionary which would be pointer
equal each time it is called for the same <parameterName>. This
dictionary would contain immutable properties for keys like
"minValue", "maxValue", etc...

Thanks for you and Keary's help. I have a few things to try out now.

Per

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to