On Oct 9, 2011, at 17:18 , livinginlosange...@mac.com wrote:
> I have an NSComboBox bound to the selection of an NSArrayController. The
> bound object is an NSDictionary. I use an NSValueTransfomer to represent the
> NSDictionary. The ValueTransformer gives me the dictionary's summary property
> which is useful for people choosing the appropriate NSDictionary from the
> array. I have set up the NSComboBox to use a datasource for custom
> autocompletion. I need case insensitive autocompletion which does not come
> straight of the box. Whenever I star typing in my NSComboBox, I get an
> -[NSDictionary length] exception. The NSComboxCell is trying to complete by
> sending a length request to the bound object, not through the transformer. Is
> there a way around this? The calling method before the exception is
> [NSComboBoxCell _completeNoRecursion]. Thanks,
There's not really enough information here to diagnose anything, except that
you refer to "choosing … from the array". That leads me to suspect you're
(wrongly) trying to use the NSComboBox as a kind of menu. It's not -- it's a
kind of text field, an editable one. What you're doing (it sounds like) is
asking to edit the dictionary's summary property, which doesn't sound sensible,
and trying to customize the autocompletion behavior is probably just making
things worse.
If you're trying to let the user choose one of an existing array of things, use
a NSPopUpButton instead, or some other variant of an actual menu. If you also
want the user to type-select things, then consider using a NSTableView.
___
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