Re: Bindings Problem
Re: Bindings Problem
- Subject: Re: Bindings Problem
- From: Camillo Lugaresi <email@hidden>
- Date: Fri, 6 Jan 2006 00:50:41 +0100
On 06/gen/06, at 00:27, John McLaughlin wrote:
If I bind my NSTextField to A.B.status I can 'type' into the
NSTextField and
it properly propogates down to the 'status' member variable in
'B' (So I
know it's bound properly)
However If I programatically change 'B' the UI never updates......
How do you change B? Do you change the variable directly or do you
call the accessor?
1. Is this somehow expected behaviour (e.g. bindings only work
one way
for objects in objects)?
No, it should work as long as the value is changed using a KVO-
compliant method.
2. Is there a way I can post a notification in 'B' that the bound
value will notice something has changed? (thus avoiding making
'A' get
involved)... E.G. is it documented anywhere what should get
posted and
could I throw this manually (via my code)
willChangeValueForKey:
didChangeValueForKey:
But you don't need them if you use accessors to change the value.
3. ?? Anything else I should know
Make sure you read the KVO documentation.
Camillo
(PS: it's "propagate")
_______________________________________________
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