Re: NSFileManager's odd behavior
Re: NSFileManager's odd behavior
- Subject: Re: NSFileManager's odd behavior
- From: Shane Stanley <email@hidden>
- Date: Wed, 22 Jul 2015 21:23:12 +1000
On 22 Jul 2015, at 9:09 pm, Takaaki Naganoya <email@hidden> wrote:
>
> This script generates 1000 folders on Desktop/test by using Cocoa NSFileManager.
> But this stops after few folder generated. Why?
> <snip>
> set aRes to (fileManager's createDirectoryAtPath:dirPath withIntermediateDirectories:true attributes:false |error|:(reference))
The problem is the attributes parameter. The documentation says it should be either a dictionary of attributes, or nil. Change that false to (missing value).
> --> error number -10000 -[__NSCFBoolean objectForKey:]: unrecognized selector sent to instance 0x7fff740798b8
I suspect that __NSCFBoolean is your false argument; objectForKey: is a dictionary method, hence the exception.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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