• 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
NSTextView - supplying word completions for insertion point?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView - supplying word completions for insertion point?


  • Subject: NSTextView - supplying word completions for insertion point?
  • From: Jim Correia <email@hidden>
  • Date: Tue, 29 Aug 2006 16:39:01 -0400

I have a text view in for which I'd like to offer a small number of completions for. I'm currently supplying these via the appropriate delegate method.

What I would like to do in addition is offer up all of the possibly completions (there aren't that many) when the user tries to "complete" an insertion point.

NSTextView appears to go backwards to the next word boundary (over whitespace) which is undesirable, but a simple override can correct that.

However, if I return a 0 length range from -rangeForUserCompletion, the completions are never triggered. The documentation is explicit that I should "Returning (NSNotFound, 0) suppresses completion." How can I convince NSTextView that it should offer up a list of completions for an empty completion range?

Thanks,
Jim


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSTextView - supplying word completions for insertion point?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: runModalSession:relativeToWindow: alternative?
  • Next by Date: Automatic opening of a DataFile at awakeFromNib??
  • Previous by thread: Re: runModalSession:relativeToWindow: alternative?
  • Next by thread: Re: NSTextView - supplying word completions for insertion point?
  • Index(es):
    • Date
    • Thread