Revision: 5047
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5047&view=rev
Author:   hofman
Date:     2008-12-11 16:02:57 +0000 (Thu, 11 Dec 2008)

Log Message:
-----------
return empty string when -stringValue or -string return nil for template string 
value

Modified Paths:
--------------
    trunk/SKTemplateParser.m

Modified: trunk/SKTemplateParser.m
===================================================================
--- trunk/SKTemplateParser.m    2008-12-11 12:33:54 UTC (rev 5046)
+++ trunk/SKTemplateParser.m    2008-12-11 16:02:57 UTC (rev 5047)
@@ -802,12 +802,11 @@
 }
 
 - (NSString *)templateStringValue {
-    NSString *description = nil;
     if ([self respondsToSelector:@selector(stringValue)])
-        description = [self performSelector:@selector(stringValue)];
-    else if ([self respondsToSelector:@selector(string)])
-        description = [self performSelector:@selector(string)];
-    return description ?: [self description];
+        return [(id)self stringValue] ?: @"";
+    if ([self respondsToSelector:@selector(string)])
+        return [(id)self string] ?: @"";
+    return [self description];
 }
 
 - (NSAttributedString 
*)templateAttributedStringValueWithAttributes:(NSDictionary *)attributes {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to