Revision: 5289
http://skim-app.svn.sourceforge.net/skim-app/?rev=5289&view=rev
Author: hofman
Date: 2009-03-30 16:57:29 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
bindings can give null instead of nil for undefined binding options
Modified Paths:
--------------
trunk/SKColorSwatch.m
trunk/SKFontWell.m
Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m 2009-03-30 12:54:54 UTC (rev 5288)
+++ trunk/SKColorSwatch.m 2009-03-30 16:57:29 UTC (rev 5289)
@@ -326,7 +326,7 @@
if (observedObject && observedKeyPath) {
id value = [[colors copy] autorelease];
NSString *transformerName = [[info objectForKey:NSOptionsKey]
objectForKey:NSValueTransformerNameBindingOption];
- if (transformerName) {
+ if (transformerName && [transformerName isEqual:[NSNull null]] == NO) {
NSValueTransformer *valueTransformer = [NSValueTransformer
valueTransformerForName:transformerName];
value = [valueTransformer reverseTransformedValue:value];
}
Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m 2009-03-30 12:54:54 UTC (rev 5288)
+++ trunk/SKFontWell.m 2009-03-30 16:57:29 UTC (rev 5289)
@@ -169,7 +169,7 @@
[self deactivate];
}
-- (void)notifyBinding {
+- (void)notifyFontBinding {
NSDictionary *info = [self infoForBinding:FONTNAME_KEY];
[[info objectForKey:NSObservedObjectKey] setValue:[self fontName]
forKeyPath:[info objectForKey:NSObservedKeyPathKey]];
info = [self infoForBinding:FONTSIZE_KEY];
@@ -181,7 +181,7 @@
if (info) {
id value = [self textColor];
NSString *transformerName = [[info objectForKey:NSOptionsKey]
objectForKey:NSValueTransformerNameBindingOption];
- if (transformerName) {
+ if (transformerName && [transformerName isEqual:[NSNull null]] == NO) {
NSValueTransformer *valueTransformer = [NSValueTransformer
valueTransformerForName:transformerName];
value = [valueTransformer reverseTransformedValue:value];
}
@@ -192,7 +192,7 @@
- (void)changeFontFromFontManager:(id)sender {
if ([self isActive]) {
[self setFont:[sender convertFont:[self font]]];
- [self notifyBinding];
+ [self notifyFontBinding];
[self sendAction:[self action] to:[self target]];
}
}
@@ -430,12 +430,12 @@
}
}
@catch (id exception) {
- NSLog(@"Ignroing exception %@ when dropping on SKFontWell failed",
exception);
+ NSLog(@"Ignoring exception %@ when dropping on SKFontWell failed",
exception);
}
if (droppedFont) {
[self setFont:droppedFont];
- [self notifyBinding];
+ [self notifyFontBinding];
[self sendAction:[self action] to:[self target]];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit