Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: When do bound objects get updated?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When do bound objects get updated?



At 6:15 AM -0700 7/16/04, Larry Fransson wrote:
On Jul 16, 2004, at 01:11, Darren Ford wrote:

When I save the entries to a file (using NSArchiver), any changes that I've made to the current NSTextView contents don't get written to the file.

Be sure to check the box labeled "Continuously Updates Value" in the bindings inspector panel for the text field. Without that, the new value gets sent only when editing is ended by tabbing out of the field, pressing the return/enter key, or otherwise sending focus to some other part of the interface like when you click on the table.

Of course, if you do this, your undo mechanism can get ugly, since every keystroke then becomes a change.

So if you have a text field that currently contains the number 200 and the user wants to change this to 1024, each of the four characters will result in a new undo action, so after entering 1024 they decide to undo, well, it goes back to 102. A second time brings it back to 10, a third time to 1, and finally the fourth time brings it back 200 (which is what they probably expected).


--
Glenn Andreas email@hidden mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >When do bound objects get updated? (From: Darren Ford <email@hidden>)
 >Re: When do bound objects get updated? (From: Larry Fransson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.