• 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: Empty NSStrings, nil NSStrings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty NSStrings, nil NSStrings


  • Subject: Re: Empty NSStrings, nil NSStrings
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 16 Apr 2006 20:17:18 +0200

Rosyna,

On 16.4.2006, at 20:09, Rosyna wrote:

Presumably, eventually should just *any* method which can return an object and can fail work this very same way, but it is not so in Tiger, and I bet a fortune it won't in Leopard, either :)

I think I would agree with this if I understood it? But many APIs will return a non-NULL object even if an error occurs if the API returns the error.

Sorry for my English :(

The intention was to say that I personally believe that

(a) if any method returns an object (compared to voids, BOOLs, ints, whatevers),
(b) and the method can fail for any reason,


then in "future Cocoa" such a method

(i) would return nil if *and only if* it failed
(ii) would have an extra NSError** argument to return the fail reason.
---
Ondra Čada
OCSoftware:     email@hidden               http://www.ocs.cz
private         email@hidden             http://www.ocs.cz/oc


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Empty NSStrings, nil NSStrings (From: Paolo Bertani <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Ali Ozer <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Rosyna <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Ondra Cada <email@hidden>)
 >Re: Empty NSStrings, nil NSStrings (From: Rosyna <email@hidden>)

  • Prev by Date: Re: Empty NSStrings, nil NSStrings
  • Next by Date: Re: Empty NSStrings, nil NSStrings
  • Previous by thread: Re: Empty NSStrings, nil NSStrings
  • Next by thread: Adding simple AppleScript commands to a Cocoa application
  • Index(es):
    • Date
    • Thread