mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-08 01:48:04 +00:00
Improve code readability with dictionary literals.
This commit is contained in:
1 parent
472848da91
commit
8bcbeb0aa9
43 files changed
+88
-86
No files matched your search
@@ -96,14 +96,14 @@ CPLogRegister(CPLogConsole);
|
||||
[totalCountField bind:CPValueBinding toObject:arrayController
|
||||
withKeyPath:@"selectedObjects.@sum.price" options:nil];
|
||||
|
||||
var bindingOptions = [CPDictionary dictionary];
|
||||
var bindingOptions = @{};
|
||||
//[bindingOptions setObject:@"No Name" forKey:@"NSNullPlaceholder"];
|
||||
[selectedNameField bind:CPValueBinding toObject:arrayController
|
||||
withKeyPath:@"selection.name" options:bindingOptions];
|
||||
|
||||
// binding for "name" column
|
||||
var tableColumn = [tableView tableColumnWithIdentifier:@"name"],
|
||||
bindingOptions = [CPDictionary dictionary];
|
||||
bindingOptions = @{};
|
||||
|
||||
[tableColumn bind:CPValueBinding toObject:arrayController
|
||||
withKeyPath:@"arrangedObjects.name" options:bindingOptions];
|
||||
@@ -111,7 +111,7 @@ CPLogRegister(CPLogConsole);
|
||||
|
||||
// binding options for "price"
|
||||
// no need for placeholder as overridden by formatters
|
||||
bindingOptions = [CPDictionary dictionary];
|
||||
bindingOptions = @{};
|
||||
//[bindingOptions removeObjectForKey:@"NSNullPlaceholder"];
|
||||
//[bindingOptions setObject:YES
|
||||
// forKey:CPValidatesImmediatelyBindingOption];
|
||||
@@ -120,7 +120,7 @@ CPLogRegister(CPLogConsole);
|
||||
|
||||
// binding for "price" column
|
||||
tableColumn = [tableView tableColumnWithIdentifier:@"price"];
|
||||
bindingOptions = [CPDictionary dictionary];
|
||||
bindingOptions = @{};
|
||||
[tableColumn bind:CPValueBinding toObject:arrayController
|
||||
withKeyPath:@"arrangedObjects.price" options:bindingOptions];
|
||||
|
||||
|
||||
Reference in new issue
Block a user