implementing text completion
implementing text completion
- Subject: implementing text completion
- From: Mark Lilback <email@hidden>
- Date: Mon, 27 Oct 2003 23:15:38 -0800 (PST)
I'm trying to add support for text completion to my application under Panther and am running into a few problems. Has anyone else tried this yet and had it work properly?
I'm implementing textView:completions:forPartialWordRange:indexOfSelectedItem: in my NSTextView delegate, and the list of words I return is appearing in the completion list. But the value I return in indexOfSelectedItem is always ignored and the first item is selected.
As a work-around, I'd like to return my list in best-match order (like the default implementation does). Is there any public API to sort an array in best-match order compared to another string? If not, does anyone know of an algorithm to do that?
This seems like some pretty complex functionality already in the OS that anyone implementing text completion will need.
Thanks
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<email@hidden> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin
_______________________________________________
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.