On 27 Mar 2012, at 22:23, Rick Mann wrote: >> There are a couple other issues: >> >> 1) You shouldn't handle errors by testing (err != nil). This might work >> (since you initialized err to nil) assuming that removeItemAtURL: isn't >> fiddling with err anyway, but it's not guaranteed. The preferred >> approach is to test the return value of removeItemAtURL: (it returns >> BOOL for a reason!) and examine err iff the method returns NO. > > Okay, I made that change, but it seems blatantly incorrect to create an error > return if it is also going to return true.
http://weblog.bignerdranch.com/?p=360 _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com