mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-13 02:08:55 +00:00
exposed more bindings on CPControl
This commit is contained in:
1 parent
3cd44284c4
commit
084da71420
1 file changed
+15
-8
+15
-8
@@ -136,10 +136,25 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
if (self === [CPControl class])
|
||||
{
|
||||
[self exposeBinding:@"value"];
|
||||
[self exposeBinding:@"objectValue"];
|
||||
[self exposeBinding:@"stringValue"];
|
||||
[self exposeBinding:@"integerValue"];
|
||||
[self exposeBinding:@"intValue"];
|
||||
[self exposeBinding:@"doubleValue"];
|
||||
[self exposeBinding:@"floatValue"];
|
||||
|
||||
[self exposeBinding:@"enabled"];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)_replacementKeyPathForBinding:(CPString)aBinding
|
||||
{
|
||||
if (aBinding === @"value")
|
||||
return @"objectValue";
|
||||
|
||||
return [super _replacementKeyPathForBinding:aBinding];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)aFrame
|
||||
{
|
||||
self = [super initWithFrame:aFrame];
|
||||
@@ -578,14 +593,6 @@ BRIDGE(ImageScaling, imageScaling, "image-scaling")
|
||||
return [self hasThemeState:CPThemeStateHighlighted];
|
||||
}
|
||||
|
||||
- (id)_replacementKeyPathForBinding:(CPString)binding
|
||||
{
|
||||
if ([binding isEqual:@"value"])
|
||||
return @"objectValue";
|
||||
|
||||
return binding;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPControlValueKey = "CPControlValueKey",
|
||||
|
||||
Reference in new issue
Block a user