On 2012 Jul 18, at 09:12, Jerry Krinock wrote: > • "value" binding of an NSTokenField bound is bound via an object controller > to an array property of a model object. > • -tokenField:completionsForSubstring:indexOfToken:indexOfSelectedItem: is > implemented to show completions. > > The completions menu shows, but when user hits the down-arrow key, instead of > stepping into the completions menu, the token ends editing immediately, > setting its value to the first completion in the menu. > > Problem seems to be related to the "value" binding, because without this > binding the down-arrow key steps into the completions menu as expected. > Works the same with or without the binding options (No Selection, Multiple > Values, etc.). Also works the same with either binding in Interface Builder > or in code.
For some reason, if I implement a cheesy "helper" attribute in the window controller, and bind the token field's "value" to this, bypassing the object controller, the problem is solved. I tried to reproduce the problem in a small test project, but its completions menu always works as expected, with or without the object controller. The explanation may be that, in the real project, the binding is to a special "multi-object" object which I have designed to merge attributes for multiple selections, via -(set)valueForUndefinedKey:. But all this trouble is in 10.7, and with 10.8 on the way, the boss says I should ship with the cheesy "helper" attribute workaround and move on. Sorry :) _______________________________________________ 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