Re: codeSense
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>) |