Getting the path to a resource (scpt)
Getting the path to a resource (scpt)
- Subject: Getting the path to a resource (scpt)
- From: Jeffrey Mattox <email@hidden>
- Date: Sun, 26 Jan 2003 19:04:56 -0600
I need to get the path to an AppleScript file ("FM.scpt") that is
compiled as part of my AppleScript Studio project, but my code fails.
I am doing this:
NSString *theCompiledScript;
theCompiledScript = [[NSBundle mainBundle]
pathForResource:@"FM" ofType:@"scpt"];
NSLog(@"%@\n",theCompiledScript); // fails: gives "(null)"
However, The file really is there at:
.../FM.app/Contents/Resources/Scripts/FM.scpt
As a test, I tried this and it returns the bundle's path:
NSLog(@"%@\n",[NSBundle mainBundle]);
That shows the full path to my app's bundle: "/blahblah.../FM.app"
What am I doing wrong when looking for the script file?
Jeff
_______________________________________________
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.