• 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
Re: Calling Cocoa APIs from a command line application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling Cocoa APIs from a command line application


  • Subject: Re: Calling Cocoa APIs from a command line application
  • From: Scott Anguish <email@hidden>
  • Date: Sat, 13 Sep 2003 13:22:10 -0400

On Saturday, September 13, 2003, at 1:00 PM, John Siracusa wrote:

I want to call an NSWorkspace method from a simple command-line script. I
naively thought this would work:


I think there might be an easier way to do this. Maybe AppleScript, which you can fire off from a script trivally. You want the Finder to notice, right?

#import <AppKit/NSWorkspace.h>;

int main(int argc, const char *argv[])
{
[[NSWorkspace sharedWorkspace]] noteFileSystemChanged:@"/foo/bar"];
return 0;
}

But it doesn't, and I get this error:

new.m:5: cannot find interface declaration for `NSConstantString'

Did you link against AppKit as well?

Also, at run time, you won't have an initialized app instance, and if nobody is logged in, this may prevent your app from running.


/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h: 109:
header file 'Foundation/NSURLError.h' not found


I've seen this before, do you have the full, release of Safari 1.0 installed?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Calling Cocoa APIs from a command line application
      • From: John Siracusa <email@hidden>
References: 
 >Calling Cocoa APIs from a command line application (From: John Siracusa <email@hidden>)

  • Prev by Date: Calling Cocoa APIs from a command line application
  • Next by Date: Re: Calling Cocoa APIs from a command line application
  • Previous by thread: Calling Cocoa APIs from a command line application
  • Next by thread: Re: Calling Cocoa APIs from a command line application
  • Index(es):
    • Date
    • Thread