FROM : Jeffrey Mattox
DATE : Mon Jan 27 02:04:56 2003
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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Mon Jan 27 02:04:56 2003
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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Jeffrey Mattox | Jan 27, 02:04 | |
| Vince DeMarco | Jan 27, 02:14 |






Cocoa mail archive

