mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +00:00
using explicit setters instead of bindings for selection
This commit is contained in:
@@ -104,12 +104,9 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
||||
|
||||
[self.view layout];
|
||||
|
||||
/* Init edit and cancel buttons */
|
||||
self.editButton.action = @selector(beginEditing:);
|
||||
self.cancelEditButton.action = @selector(cancelEditing:);
|
||||
self.cancelEditButton.hidden = YES;
|
||||
|
||||
[self _toggleEditors:NO];
|
||||
[self _establishBindings];
|
||||
}
|
||||
|
||||
- (void)registerNotificationsForDocument:(MPDocument *)document {
|
||||
@@ -119,10 +116,6 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
||||
object:document];
|
||||
[self.entryViewController registerNotificationsForDocument:document];
|
||||
|
||||
|
||||
[self.nodeController bind:NSContentBinding toObject:document withKeyPath:NSStringFromSelector(@selector(selectedItem)) options:nil];
|
||||
[self _establishBindings];
|
||||
|
||||
[self.entryViewController setupBindings:document];
|
||||
[self.groupViewController setupBindings:document];
|
||||
}
|
||||
@@ -284,8 +277,9 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
|
||||
else {
|
||||
self.activeTab = MPEmptyTab;
|
||||
}
|
||||
|
||||
[self _establishBindings];
|
||||
self.nodeController.content = document.selectedItem;
|
||||
self.entryViewController.representedObject = document.selectedItem.asEntry;
|
||||
self.groupViewController.representedObject = document.selectedItem.asGroup;
|
||||
}
|
||||
|
||||
- (IBAction)beginEditing:(id)sender {
|
||||
|
||||
Reference in New Issue
Block a user