Re: Positioning of autocomplete popups
Re: Positioning of autocomplete popups
- Subject: Re: Positioning of autocomplete popups
- From: Ross Carter <email@hidden>
- Date: Mon, 18 May 2009 10:37:45 -0400
On May 18, 2009, at 5:09 AM, Dave Robertson wrote:
Is there a way to control the position or appearance of an
autocomplete popup? I've noticed that autocompletion in Xcode does
the right thing - is anyone able to suggest how this could be
achieved?
IMHO, the default text completion list is uncommonly ugly. Here's one
approach:
1. In your NSTextView subclass, override complete:. Get the array of
hits using completionsForPartialWordRange:indexOfSelectedItem:.
2. Filter that list. I don't need the list to contain the word I've
alrready typed, nor a bunch of words with apostrophe-s appended. Also
limit the number of hits to a reasonable amount.
3. Put the filtered list in a popup button and draw it.
Ross Carter
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden