On 2010 Apr 06, at 16:36, Chris Idou wrote:

> If I turn off Continuously  Update Value, it works sensibly,

Turn it off.  Look at any of Apple's Sample Code.  Also, Cocoa Design Rule #1: 
If something is off/on by default, don't change it unless you're knowingly 
doing something weird.

> albeit not as nice since you've got to exit the field to have everything in 
> synch.

That's the way most apps work.

You did not mention using an array controller.  To insure data integrity in 
case user tabs out, abruptly closes the window, etc., do not bind directly to 
the model.  Instead, bind your text fields ("detail views") to an 
NSArrayController to which the table columns are also bound.  As a matter of 
fact, if you didn't use an array controller, you'd better look at Apple's 
DepartmentAndEmployees sample code and be prepared for a little re-work.  There 
may be a way to make it work without an array controller, but why bother?

The way I understand it, the NSArrayController superclass NSObjectController 
fulfills the same purpose of data integrity if you can't bind to an array 
controller, for example if you have an Inspector in another nib.  
NSObjectController seems like a heavy weight for this purpose, but it works.  
For an example of this, in DepartmentAndEmployees's MyDocument.nib, look at the 
NSObjectController named 'Department Controller'.  It seems like it's useless 
but it's not.

Probably someone else can give a more in-depth explanation.

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to