Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 10:59 , Sean McBride wrote: > > I'd say the header is in error in the sense that it should have nullability > specified. You may be right, but my post was an *informal* comment in the sense that you seemed to be asking whether a nil parameter value

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread João Varela
Hi Sean Yes, I was bitten by that too, very, very recently, when I was translating a few files into Swift and I got warning when I didn’t use an optional for the object of the method. Actually, I suspect that’s a bug in the headers, or probably that’s a non-audited header for nullability.

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Richard Charles
> On Jan 13, 2017, at 9:30 AM, Richard Charles wrote: > > > You can chain array controller together. You can chain array controllers together. Also binding using a controller will work better in Interface Builder than binding directly. Binding directly in Interface

Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Sean McBride
Hi all, NSObject.h declares: - (BOOL)isEqual:(id)object; Note the parameter is not nullable. And yet, I'm seeing nil passed to one of my class's overrides of isEqual: when I invoke Edit>Undo. Backtrace: #4 -[RRLookupTable isEqual:] #5 -[NSManagedObject(_NSInternalMethods)

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Sean McBride
On Fri, 13 Jan 2017 09:53:25 -0800, Jens Alfke said: >So yes, the parameter should be declared as `nullable`. Thanks, Sean ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Sean McBride
On Fri, 13 Jan 2017 10:51:18 -0800, Jens Alfke said: >So Quincey is actually correct — isEqual: has unspecified nullability, >and the header is not in error. I'd say the header is in error in the sense that it should have nullability specified. Quite surprising that it's not done by now.

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Sandor Szatmari
I was thinking, and I'm guessing there were no warnings and errors in Xcode on this line of code, that a clean compile would indicate that the header did not match the documentation. Does this make sense? Sandor > On Jan 13, 2017, at 12:53, Jens Alfke wrote: > > >> On

Re: NSNetServiceBrowser vs. mDNSResponder

2017-01-13 Thread Jens Alfke
> On Jan 13, 2017, at 1:40 AM, Gerriet M. Denkmann wrote: > > SERVICE_TYPE = 1 to 63 ascii chars; no spaces; no ‘.’; no ‘[‘; can use ‘_' > or '-'; case insensitive > Note: I did not find these rules documented anywhere, they are just the > result of trial and error.

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 09:52 , Charles Srstka wrote: > > What does NSObjectController do? Well, not a lot, but what it does is pretty > helpful: There’s one other obscure thing that NSObjectController does (or did, since I don’t know if this situation still exists, but

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Sean McBride
On Fri, 13 Jan 2017 10:43:09 -0800, Ben Kennedy said: >> Did I miss a change in clang that made the default “not nullable”?? I >read the above declaration as meaning that the nullability is >*unspecified*, which implies that nil is allowed. > >NSObject.h (from which Sean was quoting) begins with

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Charles Srstka
> On Jan 13, 2017, at 6:39 AM, Daryle Walker > wrote: > > If my data model supports KVC/KVO, it seems like I should be able to bind my > views to my data directly via Cocoa Bindings, without using NSArrayController > or NSObjectController or the like.

Re: NSNetServiceBrowser vs. mDNSResponder

2017-01-13 Thread Alastair Houghton
On 13 Jan 2017, at 09:40, Gerriet M. Denkmann wrote: > > iOS (10.2) app does: > > SERVICE_TYPE = 1 to 63 ascii chars; no spaces; no ‘.’; no ‘[‘; can use ‘_' > or '-'; case insensitive > Note: I did not find these rules documented anywhere, they are just the > result of

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Jens Alfke
> On Jan 13, 2017, at 9:46 AM, Sean McBride wrote: > > Anyone ever seen nil passed to isEqual:? Is the SDK declaration maybe wrong? Check the class documentation, not just the header. The parameter is declared as: anObjectThe object to be compared to

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Charles Srstka
> On Jan 13, 2017, at 6:39 AM, Daryle Walker wrote: > > If my data model supports KVC/KVO, it seems like I should be able to bind my > views to my data directly via Cocoa Bindings, without using NSArrayController > or NSObjectController or the like. What advantage do those

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Quincey Morris
On Jan 13, 2017, at 09:46 , Sean McBride wrote: > > NSObject.h declares: > > - (BOOL)isEqual:(id)object; > > Note the parameter is not nullable. Did I miss a change in clang that made the default “not nullable”?? I read the above declaration as meaning that the

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Ben Kennedy
> On 13 Jan 2017, at 10:34 am, Quincey Morris > wrote: > > Did I miss a change in clang that made the default “not nullable”?? I read > the above declaration as meaning that the nullability is *unspecified*, which > implies that nil is allowed.

Re: Seeing nil passed to isEqual:, despite non-null declaration

2017-01-13 Thread Jens Alfke
> On Jan 13, 2017, at 10:43 AM, Ben Kennedy wrote: > > NSObject.h (from which Sean was quoting) begins with NS_ASSUME_NONNULL_BEGIN > which, to my understanding, makes everything in the file be non-nullable > unless otherwise annotated. You’re looking at . But the -isEqual:

Re: What do NSArrayController, etc. do for me?

2017-01-13 Thread Richard Charles
___ 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:

NSNetServiceBrowser vs. mDNSResponder

2017-01-13 Thread Gerriet M. Denkmann
iOS (10.2) app does: SERVICE_TYPE = 1 to 63 ascii chars; no spaces; no ‘.’; no ‘[‘; can use ‘_' or '-'; case insensitive Note: I did not find these rules documented anywhere, they are just the result of trial and error. fullNameOfServiceType = “_SERVICE_TYPE._tcp." [ NSNetServiceBrowser

What do NSArrayController, etc. do for me?

2017-01-13 Thread Daryle Walker
If my data model supports KVC/KVO, it seems like I should be able to bind my views to my data directly via Cocoa Bindings, without using NSArrayController or NSObjectController or the like. What advantage do those classes give me? Sent from my iPhone