MathPaper (Chapter 10) fails
MathPaper (Chapter 10) fails
- Subject: MathPaper (Chapter 10) fails
- From: "Richard S. French" <email@hidden>
- Date: Sat, 20 Dec 2008 11:28:17 -0500
- Thread-topic: MathPaper (Chapter 10) fails
MathPaper project chapter 10 in Oreilly¹s ³Building Cocoa Applications²
fails with the following error:
³2008-12-20 11:23:59.664 MathPaper[517] *** -[NSCFDictionary
setObject:forKey:]: attempt to insert nil value²
Note that I am using Xcode 2.4.1. I also have the evaluator copied under
MathPaper in targets.
I have searched the archives and found others have had this problem but I
did not find a resolution.
Evaluator fails to launch?
Code is as follows:
- (void)windowDidLoad
{
NSString *path=0;
[super windowDidLoad];
[[self window] makeFirstResponder:theText];
path = [[NSBundle mainBundle] pathForAuxiliaryExecutable:@"Evaluator"];
NSLog(@"path set");
toPipe = [NSPipe pipe];
fromPipe = [NSPipe pipe];
toEvaluator = [toPipe fileHandleForWriting];
fromEvaluator = [fromPipe fileHandleForReading];
NSLog(@"pipe set");
evaluator = [[NSTask alloc] init];
[evaluator setLaunchPath:path];
[evaluator setStandardOutput:fromPipe];
[evaluator setStandardInput:toPipe];
[evaluator launch];
NSLog(@"Evaluator launched");
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(gotData:)
name:NSFileHandleReadCompletionNotification
object:fromEvaluator];
[fromEvaluator readInBackgroundAndNotify];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden