• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
implementing text completion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: NSXMLParser failing w/o quotes?
  • Next by Date: Re: EOF on Mac OS X
  • Previous by thread: Re: Displaying Realtime Data
  • Next by thread: How to get Mac OS X System preference window from cocoa application
  • Index(es):
    • Date
    • Thread