• 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: macOS 10.13 suggestion for init() throws
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macOS 10.13 suggestion for init() throws


  • Subject: Re: macOS 10.13 suggestion for init() throws
  • From: Greg Parker <email@hidden>
  • Date: Tue, 28 Feb 2017 13:20:50 -0800

> On Feb 28, 2017, at 4:56 AM, Daryle Walker <email@hidden> wrote:
>
> Could we have a NSDocument.init() that throws in the next macOS? That would translate to a "initWithError" in Objective C (I think). It would be the new primary initializer, with the current one calling it and dropping any error to oblivion.

It is not possible to retroactively change the designated initializers for a class. The designated initializer pattern requires subclasses to cooperate by overriding and calling particular initializers. Changing the designated initializers for a class like NSDocument would break all of its existing subclasses.


--
Greg Parker     email@hidden <mailto:email@hidden>     Runtime Wrangler


_______________________________________________

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: 
 >macOS 10.13 suggestion for init() throws (From: Daryle Walker <email@hidden>)

  • Prev by Date: Re: Replacement of deprecated API GetProcessInformation
  • Next by Date: Re: macOS 10.13 suggestion for init() throws
  • Previous by thread: Re: macOS 10.13 suggestion for init() throws
  • Next by thread: Replacement of deprecated API GetProcessInformation
  • Index(es):
    • Date
    • Thread