mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-04 03:44:58 +00:00
Merge branch 'master' of git://github.com/280north/cappuccino
This commit is contained in:
commit
14226ef69c
3 files changed
+26
-14
No files matched your search
@@ -1152,7 +1152,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
|
||||
_numberOfRows = [_dataSource numberOfRowsInTableView:self];
|
||||
else
|
||||
{
|
||||
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
|
||||
if (_dataSource)
|
||||
CPLog(@"no content binding established and data source " + [_dataSource description] + " does not implement numberOfRowsInTableView:");
|
||||
_numberOfRows = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
@import "CPButton.j"
|
||||
@import "CPScrollView.j"
|
||||
@import "CPTextField.j"
|
||||
@import "CPTableView.j"
|
||||
@import "CPWindow.j"
|
||||
@import "_CPMenuWindow.j"
|
||||
|
||||
|
||||
@@ -109,29 +109,39 @@ NIB_CONNECTION_EQUIVALENCY_TABLE = {};
|
||||
|
||||
@end
|
||||
|
||||
var NSTramsformers = [CPSet setWithObjects:
|
||||
@"NSNegateBoolean",
|
||||
@"NSIsNil",
|
||||
@"NSIsNotNil",
|
||||
@"NSUnarchiveFromData",
|
||||
@"NSKeyedUnarchiveFromData"];
|
||||
|
||||
@implementation CPCibBindingConnector (NSCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super NS_initWithCoder:aCoder])
|
||||
self = [super NS_initWithCoder:aCoder];
|
||||
|
||||
if (self)
|
||||
{
|
||||
_binding = [aCoder decodeObjectForKey:@"NSBinding"];
|
||||
_keyPath = [aCoder decodeObjectForKey:@"NSKeyPath"];
|
||||
|
||||
_options = [CPDictionary dictionary];
|
||||
var nsoptions = [aCoder decodeObjectForKey:@"NSOptions"],
|
||||
keyEnum = [nsoptions keyEnumerator],
|
||||
aKey;
|
||||
while (aKey = [keyEnum nextObject])
|
||||
|
||||
var NSOptions = [aCoder decodeObjectForKey:@"NSOptions"],
|
||||
keyEnumerator = [NSOptions keyEnumerator],
|
||||
key;
|
||||
|
||||
while (key = [keyEnumerator nextObject])
|
||||
{
|
||||
var CPKey = [CPString stringWithFormat:@"CP%@", aKey.substring(2)],
|
||||
nsvalue = [nsoptions objectForKey:aKey],
|
||||
nstramsformers = [CPArray arrayWithObjects:@"NSNegateBoolean", @"NSIsNil", @"NSIsNotNil", @"NSUnarchiveFromData", @"NSKeyedUnarchiveFromData"];
|
||||
|
||||
if (CPKey == CPValueTransformerNameBindingOption && [nstramsformers containsObject:nsvalue])
|
||||
nsvalue = [CPString stringWithFormat:@"CP%@", nsvalue.substring(2)];
|
||||
|
||||
[_options setObject:nsvalue forKey:CPKey];
|
||||
var CPKey = @"CP" + key.substring(2),
|
||||
NSValue = [NSOptions objectForKey:key];
|
||||
|
||||
if (CPKey === CPValueTransformerNameBindingOption && [NSTramsformers containsObject:NSValue])
|
||||
NSValue = @"CP" + NSValue.substring(2);
|
||||
|
||||
[_options setObject:NSValue forKey:CPKey];
|
||||
}
|
||||
|
||||
CPLog.debug(@"Binding Connector: " + [_binding description] + " to: " + _destination + " " + [_keyPath description] + " " + [_options description]);
|
||||
|
||||
Reference in new issue
Block a user