• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSFileWrapper - is this really so bad?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileWrapper - is this really so bad?


  • Subject: Re: NSFileWrapper - is this really so bad?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 27 Oct 2015 17:04:28 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sZCDIoo3zD:SMTPCORP

On Oct 27, 2015, at 16:24 , Graham Cox <email@hidden> wrote:
>
> 	NSFileWrapper* fw = [[NSFileWrapper alloc] initDirectoryWithFileWrappers:nil];		//<—  Null passed to a callee that requires a non-null argument

It’s not necessarily so much about null vs non-null. A side effect of the API audit that’s been ongoing after Swift happened is that it’s become preferred (when there’s a choice) to pass an empty collection instead of a nil pointer. (In the past, in many cases, it was ambiguous/inconsistent whether both were allowed/equivalent.)

So my guess is that the API hasn’t changed (that is, if you somehow force a nil value to be passed, it will still work the same), but that the SDK has changed (that is, you’re now supposed to pass an empty dictionary). Have you tried an empty dictionary?



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >NSFileWrapper - is this really so bad? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: NSFileWrapper - is this really so bad?
  • Next by Date: Re: NSFileWrapper - is this really so bad?
  • Previous by thread: Re: NSFileWrapper - is this really so bad?
  • Next by thread: Re: NSFileWrapper - is this really so bad?
  • Index(es):
    • Date
    • Thread