Re: ASObjc: FileManager changeCurrentDirectoryPath not recognized
Re: ASObjc: FileManager changeCurrentDirectoryPath not recognized
- Subject: Re: ASObjc: FileManager changeCurrentDirectoryPath not recognized
- From: Yvan KOENIG <email@hidden>
- Date: Sun, 19 Mar 2017 16:53:20 +0100
Le 19 mars 2017 à 16:18, Mitchell L Model < email@hidden> a écrit :
I know that "working directory" is undefined in regular AppleScripts. But I have an ASObjc script in which I do want to change the current working directory so that I can use relative paths. I have the corresponding code working in Objective-C, but the following produces an error in ASObjc:
my NSFileManager's defaultManager's changeCurrentDirectoryPath
The error is:
-[NSFileManager changeCurrentDirectoryPath] unrecognized selector sent to instance …
Getting the current working directory works fine:
my NSFileManager's defaultManager's currentDirectoryPath
I thought ASObjc was a complete bridge to the Foundation library. Anyone know what's going on here?
My understanding is that you are supposed to pass the new path to use in the instruction.
Xcode help states :changeCurrentDirectoryPath:
Changes the path of the current working directory to the specified path. (BOOL)changeCurrentDirectoryPath:(NSString *)path;
path | The path of the directory to which to change. |
Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) dimanche 19 mars 2017 16:53:15
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden