Re: Calling Cocoa APIs from a command line application
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.