Re: Bindings Problem: KVO Not Being triggered?
Re: Bindings Problem: KVO Not Being triggered?
- Subject: Re: Bindings Problem: KVO Not Being triggered?
- From: Keary Suska <email@hidden>
- Date: Thu, 24 Aug 2006 10:50:21 -0600
- Thread-topic: Bindings Problem: KVO Not Being triggered?
on 8/24/06 7:52 AM, email@hidden purportedly said:
>> When a row is double-clicked an
>> action is triggered in the arraycontroller that sets an objectcontroller
>> subclass' content (-setContent:) and open a modal window with field values
>> bound to the objectcontroller.
>
>> The problem appears when the same table row is double clicked. Even though
>> the objectcontroller is being sent content, the content doesn't update--i.e.
>> Shows the last edited values
>
> The second paragraph seems to say that the first paragraph is not working
> (in that one circumstance). Since the notion "an action is triggered..." is
> mysterious, that is the part one wants to hear more about. Could you show
> the code for the doubleclick action?
>
> Also, could you explain why the objectController needs to override
> setValue:forUndefinedKey? Why would there be any undefined keys? m.
Thank you for responding. While preparing an email response I found my
error. For prosperity, I will relay something I found.
To clarify, it is my model object that overrides -setValue:forUndefinedKey:.
It does this 1) to trap changes made to its dict and 2) to allow transparent
access. I understand that I could simply observe the dict keys but I ran
into problems because under certain circumstances the model has to change
the dict values without being notified, and it was a lesser pain (at the
time, perhaps) to take my current approach.
The issue was that a method was changing the dict values directly, instead
of through the owning model object (which is what is bound). In short, I
wasn't making changes in a KVO compliant manner. I was thrown because the
arraycontroller was updating properly despite this. Maybe there is something
about tableviews+arraycontrollers that force refreshes more often.
Anyway, thanks for responding.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden