Re: Feature suggestions for easier debugging of Cocoa Bindings.
Re: Feature suggestions for easier debugging of Cocoa Bindings.
- Subject: Re: Feature suggestions for easier debugging of Cocoa Bindings.
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 19 Apr 2005 18:36:08 -0700
On Apr 19, 2005, at 4:26 PM, Corey O'Connor wrote:
The Cocoa bindings reference is your friend.
The reference reminds me of Straustrup. Full of useful bits and
insight, with no time wasted on making a set of cohesive documents to
explain bindings from every viewpoint. ;-)
That is exactly the point of the *reference*. The reference is not
intended to be conceptual. For explanations of how bindings work and
how you should use them see, for example:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/index.html>
3) I think you are wrong about 'no selection' and 'null'. In obj-C it
is perfectly valid to send invocations to nil objects and bindings
should be no different. In trivial cases your model should always
exist, but imagine what happens with a tree of objects, where a leaf
might have no branches. The default behavior is helpful here.
Hmmm.. I still don't see how I am wrong. Depending on your data
model, not having a particular model property could indicate that the
state of the data is inconsistent with the expected data model. This
is an error that needs to be caught as soon as possible.
If my data model is "Person has a first name, and a last name".
While "first name" and "last name" can be zero length strings, both
those properties still have to exists according to my data model. If
those properties did not even exist (Null), then something is
seriously wrong! I would want to know as soon as possible in that
case.
If your data model was of the form "blah can have foo", then,
sure, being able to specify what happens when your model object does
not have the foo property is required.
You should implement suitable validation methods. See for example:
<http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/Validation.html>
mmalc
_______________________________________________
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