On Oct 13, 2012, at 11:17 PM, Randy Widell wrote: > Wow. Woah. OK, sorry my ignorance offends.
I didn't express offense. At least, I didn't intend to. > What in the world was I trying to do…I was trying to bind the selection > index of a NSComboBox to a NSNumber because the Apple Cocoa bindings document > for NSComboBox says the value can be bound to a NSNumber. It can be bound to a _property_ of some object where the type of that property is NSNumber. > Using -init didn't seem so nonsensical to me. It could it init with 0. It > could init with NaN. But, you're right, -init is not listed in the NSNumber > class reference and that should have been a clue. Well, more to the point: an NSNumber is immutable. It can only have the value it was initialized with. So, if you instantiate one in a NIB, whether it got a value of 0 or NaN, it would be stuck with that value forever. So, my point was: what good is it to bind a view's selection (or whatever) to a constant value? > Anyway, cool, I just decided to use -indexOfSelectedItem on a NSComboBox > outlet when the sheet finishes. That works, but it would also have worked to bind the value binding of the NSComboBox to a property of some controller object. My concern is that you were trying to bind it to an object (rather than a property of an object) which betrays a fundamental confusion, and I wanted to bring that out into the open so you could work through it. Regards, Ken _______________________________________________ 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