• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MathPaper (Chapter 10) fails
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: MathPaper (Chapter 10) fails
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Trackpad multi touch events in Mac OSX
  • Next by Date: How to use animation for CALayer frame.size attribute?
  • Previous by thread: Re: Trackpad multi touch events in Mac OSX
  • Next by thread: Re: MathPaper (Chapter 10) fails
  • Index(es):
    • Date
    • Thread