-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBCCiteKeyWrapper.m
More file actions
36 lines (24 loc) · 1.16 KB
/
BCCiteKeyWrapper.m
File metadata and controls
36 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// BCCiteKeyWrapper.m
// Caravan
//
// Created by Tom Houpt on 15/4/15.
// Copyright (c) 2015 Tom Houpt. All rights reserved.
//
#import "BCCiteKeyWrapper.h"
#import "AppKit/AppKit.h"
@implementation BCCiteKeyWrapper
-(id)initWithCiteKey:(NSString *)citeKey; {
NSData *ckData = [citeKey dataUsingEncoding:NSASCIIStringEncoding];
// return (BCCiteKeyWrapper *)[ckAttributedString RTFDFileWrapperFromRange:NSMakeRange(0,[ckAttributedString length])documentAttributes:[NSDictionary dictionaryWithObject:NSPlainTextDocumentType forKey:NSDocumentTypeDocumentAttribute]];
self = [super initRegularFileWithContents:ckData];
if (self) {
NSString *filename = [citeKey stringByAppendingPathExtension:@"txt"];
[self setPreferredFilename:filename];
}
return self;
// NSAttributedString *ckAttributedString = [[NSAttributedString alloc] initWithString:citeKey];
// return (BCCiteKeyWrapper *)[ckAttributedString RTFDFileWrapperFromRange:NSMakeRange(0,[ckAttributedString length])documentAttributes:[NSDictionary dictionaryWithObject:NSPlainTextDocumentType forKey:NSDocumentTypeDocumentAttribute]];
//
}
@end