Using bindings for iconImage for instant updates

Icon setting now gets registered via NSUndoManager
Refactored iconId property
This commit is contained in:
michael starke
2013-12-04 01:57:54 +01:00
parent c59ce56f4d
commit fa52de144c
6 changed files with 12 additions and 12 deletions

View File

@@ -196,9 +196,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
KPKGroup *group = [item representedObject];
view = [outlineView makeViewWithIdentifier:_MPOutlineViewDataViewIdentifier owner:self];
[view.imageView setImage:group.iconImage];
[view.textField bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil];
[view.textField bind:@"count" toObject:group withKeyPath:@"entries.@count" options:nil];
[[view imageView] bind:NSValueBinding toObject:group withKeyPath:@"iconImage" options:nil];
[[view textField] bind:NSValueBinding toObject:group withKeyPath:@"name" options:nil];
[[view textField] bind:@"count" toObject:group withKeyPath:@"entries.@count" options:nil];
}
return view;