I have a custom NSManagedObject subclass, say, Person. I also have a UIView registered with -addObserver:forKeyPath:options:context: to observe various properties of a Person, some of which are persistent like "name" and others are just dumb KVO-compliant accessors unrelated to Core Data, like "drinking".
@interface Person : NSManagedOb...
I have a data model, composed mostly of an NSMutableArray 'contents' and NSMutableDictionary 'contentsByName'. I have ViewController objects that I wish to observe changes in the data model.
I have a property "count" on the model that returns the size of the array 'contents' and I can trigger a KVO change observation with willChange: an...
Quite often I encounter a scenario when I want to observe changes on a retained property:
@interface AnObserver {…}
@property(retain) Foo *foo;
Now when I want to set up the observing, I need to write my own setter, repeating all the boilerplate setter code:
- (void) setFoo: (Foo*) newFoo {
if (newFoo == foo)
return;
...
Can you use KVO with Scripting Bridge?
I want to know if I can make an Scripting Bridge interface for my application and allow client applications to be notified by observing an object returned by one of my app's SB commands.
Is this possible? If not, what's an alternative?
...
Hello,
If I run the following code in runtime:
var scheduleFromTo = dashcode.getDataSource("scheduleFromTo");
scheduleFromTo.setValueForKeyPath(102, "parameters.fromStationNumber");
scheduleFromTo.setValueForKeyPath(103, "parameters.toStationNumber");
it works as expected in Safari, Firefox, Opera and even IE7, but not in Google Chro...
Hi everyone,
I have an NSTableView which represents a list of objects. One of the variables in the represented object is selected from a drop-down NSPopUpButtonCell (it's a cell because it's in the table view) - an NSArrayController which holds some NSManagedObjects.
The "Selected Object" for the column (in IB) is bound to the array co...
Basically I have two combo boxes whose content are bound to two NSDictionaryControllers. However the content of the second combo box depends on the selection of the first. How can I accomplish this in interface builder taking advantage of the fact that my objects implement KVO protocol. It seems that the bookComboBox selection changing d...