Key-Value Observing in Java
Key-Value Observing in Java
- Subject: Key-Value Observing in Java
- From: Brian Hannan <email@hidden>
- Date: Sun, 9 Nov 2003 03:25:05 -0800
From what I can tell of Key-Value Observing (KVO) in the Cocoa docs, to
implement it would require the Objective-C runtime to intercept
messages to key-value methods so as to notify observer objects that
keys on an object have been modified. This is used heavily by the new
NSController classes to essentially make controller level notification
built into the Objective-C runtime proper.
However, this can't be done in Java as the Java object model has
nothing like it. I'd like to experiment more with NSController in
Java. But to handle dependent key situations that
setKeys:triggerChangeNotificationForDependentKey or
observeValueForKeyPath:ofObject:change:context would do I'd need some
mechanism in Java to handle observers and key notifications. Currently
I can find none.
Does anyone know of a facility? NSNotificationCenter is the closest I
can find, but it's clearly not what is being used by KVO in NSObject.
Does Apple have any plans to support this in Java? Or is it stick more
or less to "classic MVC" in Cocoa-Java?
Thanks for any help.
--
Brian Hannan
Chief Admiral of Uncle Jam's Navy
"One nation under a groove, gettin' down just for the FUNK of it."
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.