• 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
Re: codeSense
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: codeSense


  • Subject: Re: codeSense
  • From: "Adam R. Maxwell" <email@hidden>
  • Date: Thu, 7 Jun 2007 07:21:20 -0700


On Jun 6, 2007, at 19:18, Douglas Davidson wrote:


On Jun 6, 2007, at 7:11 PM, Tony Cate wrote:

1. When xCode puts up the codeSense selection list, the list accepts up/Down arrows and the textView accepts alpha/numeric keystrokes. I don't see how to do that. I sub-classed NSTableView to capture the keystroke, but then what?

Try letting the text field handle input and take a look at control:textView:doCommandBySelector: instead. Dealing with raw keystrokes is usually troublesome.

I'd also look at using the system's completion via control:textView:completions:forPartialWordRange:indexOfSelectedItem:, possibly displaying it on a timer. I think Douglas Davidson posted an example on this list that might get you started.


If you want to look at a working implementation (BSD license), we implemented it from scratch in BibDesk. Note that we were subclassing the field editor for other reasons, so there's a lot of extraneous code here.

http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKTextViewCompletionController.m?view=log
http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/BDSKFieldEditor.m?view=log
http://bibdesk.svn.sourceforge.net/viewvc/bibdesk/trunk/bibdesk/NSTextView_BDSKExtensions.m?view=log

regards,
Adam Maxwell
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >codeSense (From: Tony Cate <email@hidden>)
 >Re: codeSense (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: Dictionaries within a dictionary - getAllValuesForKey:
  • Next by Date: Key number to Unicode string
  • Previous by thread: Re: codeSense
  • Next by thread: Re: codeSense
  • Index(es):
    • Date
    • Thread