Use symbolic constants for binding properties

This commit is contained in:
Allan Odgaard
2015-07-20 12:10:23 +02:00
parent a13b75ebc4
commit 6aad406dde
2 changed files with 2 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ NSString* const FFFindWasTriggeredByEnter = @"FFFindWasTriggeredByEnter";
_windowController.resultsViewController.doubleClickResultAction = @selector(didDoubleClickResult:);
_windowController.resultsViewController.target = self;
[_windowController.replaceAllButton bind:@"title" toObject:self withKeyPath:@"replaceAllButtonTitle" options:nil];
[_windowController.replaceAllButton bind:NSTitleBinding toObject:self withKeyPath:@"replaceAllButtonTitle" options:nil];
[_windowController.replaceAllButton bind:@"enabled2" toObject:self withKeyPath:@"canReplaceAll" options:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowWillClose:) name:NSWindowWillCloseNotification object:_windowController.window];

View File

@@ -72,7 +72,7 @@
self.view = containerView;
[encodingPopUpButton bind:@"encoding" toObject:self withKeyPath:@"encoding" options:nil];
[lineEndingsPopUpButton bind:@"selectedTag" toObject:self withKeyPath:@"lineEndings" options:@{ NSValueTransformerNameBindingOption: @"OakLineEndingsTransformer" }];
[lineEndingsPopUpButton bind:NSSelectedTagBinding toObject:self withKeyPath:@"lineEndings" options:@{ NSValueTransformerNameBindingOption: @"OakLineEndingsTransformer" }];
[bomCheckBox bind:NSEnabledBinding toObject:self withKeyPath:@"canUseByteOrderMark" options:nil];
[bomCheckBox bind:NSValueBinding toObject:self withKeyPath:@"useByteOrderMark" options:nil];
}