Revision: 5157
http://skim-app.svn.sourceforge.net/skim-app/?rev=5157&view=rev
Author: hofman
Date: 2009-01-22 16:54:55 +0000 (Thu, 22 Jan 2009)
Log Message:
-----------
Accept plain text as RTF specification in script command
Modified Paths:
--------------
trunk/NSAttributedString_SKExtensions.m
Modified: trunk/NSAttributedString_SKExtensions.m
===================================================================
--- trunk/NSAttributedString_SKExtensions.m 2009-01-22 15:28:04 UTC (rev
5156)
+++ trunk/NSAttributedString_SKExtensions.m 2009-01-22 16:54:55 UTC (rev
5157)
@@ -63,8 +63,13 @@
#pragma mark Scripting support
+ (id)scriptingRtfWithDescriptor:(NSAppleEventDescriptor *)descriptor {
- NSError *error;
- return [[[self alloc] initWithData:[descriptor data] options:[NSDictionary
dictionary] documentAttributes:NULL error:&error] autorelease];
+ NSString *string = [descriptor stringValue];
+ if (string) {
+ return [[[self alloc] initWithString:string] autorelease];
+ } else {
+ NSError *error;
+ return [[[self alloc] initWithData:[descriptor data]
options:[NSDictionary dictionary] documentAttributes:NULL error:&error]
autorelease];
+ }
}
- (id)scriptingRtfDescriptor {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit