On Apr 23, 2009, at 2:25 PM, Lee Ann Rucker wrote:

It is not your only choice, but it is probably the best choice.
Another poster suggested using isPartialStrignValid of the formatter,
but I have tried this in the past and run into undo issues,
particularly when using it to "filter" input. The problem is that undo registration happens before the validation call, and somehow the "undo typing" feature remembers the string, so when you change the string in
the validator method, and then undo, you can get add results and out-
of-bounds exceptions. Since then I haven't looked into why this
happens and how to get around it, if at all possible.


There's no workaround. I tried writing my own Undo handler, but as you've discovered the changes happen before there's a chance to handle them.

Formatters work, and bindings work, but the combination doesn't. The only solution I've found is to use a formatter without bindings, since having the formatter is more important than having bindings, useful as they may be.

Just to be clear, are you saying that you can do field filtering with a formatter, with appropriate undo support, without bindings, or are you making a general remark about difficulties when using bindings with formatters?

Thx,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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