codeSense
codeSense
- Subject: codeSense
- From: Tony Cate <email@hidden>
- Date: Wed, 6 Jun 2007 21:11:32 -0500
I'd like to give a textfield codeSense type capabilities.
Specifically, display a floating box with guesses that change as the
user types. A combobox doesn't work because there can be multiple
entries in the one textfield: "Robert, Mary", etc. The delegate
method:
control:textView:completions:forPartialWordRange:indexOfSelectedItem:, d
oesn't work because it doesn't display a selection list.
What I've tried is creating a small window with a tableView in it. I
use the textFields controlTextDidChange delegate to figure out if I
need to display the list. As far as it goes this works. The problems
are (so far):
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?
2. The tableView doesn't accept the setDoubleAction: method. In
fact, to get the single click action to work I had to set it in IB.
Does anyone have suggestions?
_______________________________________________
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