Re: Bindings Problem
Re: Bindings Problem
- Subject: Re: Bindings Problem
- From: John McLaughlin <email@hidden>
- Date: Thu, 5 Jan 2006 20:46:58 -0800
Hmmm Actually I just now tried to put an 'example' of the problem
together in a very simple 'sample' app and it works correctly!
Something about my 'bigger' app causes it now to work....
On Jan 5, 2006, at 3:50 PM, Camillo Lugaresi wrote:
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")
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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