Skip to content
Permalink
Browse files

Version 1.0.1

Attempted fix for crash on print bug.
  • Loading branch information...
FlyingDiver committed Jun 2, 2014
1 parent c3b8968 commit e97d566d87c693558e0389f4f5d365ab154e0907
Showing with 10 additions and 7 deletions.
  1. +3 −3 StokerX-Info.plist
  2. +7 −4 StokerXAppDelegate.m
@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>CFBuildDate</key>
<string>Sun Apr 6 11:57:55 CDT 2014</string>
<string>Mon Jun 2 11:09:38 EDT 2014</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
@@ -34,11 +34,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>590</string>
<string>593</string>
<key>FRFeedbackReporter.addressbookEmail </key>
<string>YES</string>
<key>FRFeedbackReporter.sendDetailsIsOptional</key>
@@ -722,10 +722,13 @@ - (void)print:(id)sender

NSAttributedString *notes = [notesView textStorage];
NSData *textData = [notes dataFromRange:NSMakeRange(0, notes.length) documentAttributes:
[NSDictionary dictionaryWithObjectsAndKeys:NSPlainTextDocumentType, NSDocumentTypeDocumentAttribute, nil] error:NULL];
NSString *textString = [[[[NSString alloc] initWithData: textData encoding:NSUTF8StringEncoding] autorelease] stringByReplacingOccurrencesOfString:@"\n" withString:@"<br />"];
[reportDict setObject: textString forKey: @"NotesText"];

[NSDictionary dictionaryWithObjectsAndKeys:NSPlainTextDocumentType, NSDocumentTypeDocumentAttribute, nil] error:NULL];
NSString *textString = [[NSString alloc] initWithData: textData encoding:NSUTF8StringEncoding];
NSString *htmlString = [textString stringByReplacingOccurrencesOfString:@"\n" withString:@"<br />"];
[reportDict setObject: htmlString forKey: @"NotesText"];
[textString release];
[htmlString release];

NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
dateFormatter.dateStyle = NSDateFormatterShortStyle;
dateFormatter.timeStyle = NSDateFormatterShortStyle;

0 comments on commit e97d566

Please sign in to comment.
You can’t perform that action at this time.