 |
 |
Getting cell being edited from NSOutlineView
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
I have an outline view set up and when the user starts editing one of the cells I want to know which cell they are editing. I over-rode
-(void)textDidChange:(NSNotifi *)not
in my outline view subclass, but the notification object is the outline view, not the NSTextFieldCell.
Any suggestions?
(p.s. thanks for all of the previous help)
|
|
|
| |
|
|
|
 |
|
 |
|
Banned
Join Date: Apr 2002
Location: -
Status:
Offline
|
|
Originally posted by macrophyllum:
I have an outline view set up and when the user starts editing one of the cells I want to know which cell they are editing. I over-rode
-(void)textDidChange NSNotifi *)not
in my outline view subclass, but the notification object is the outline view, not the NSTextFieldCell.
Any suggestions?
(p.s. thanks for all of the previous help)
1st Suggestion: RTFM.
2nd Suggestion (  ):
Try
Code:
outlineView:shouldEditTableColumn:item:
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
Returns YES to permit outlineView to edit the cell specified by tableColumn and item, NO to deny permission. The delegate can implement this method to disallow editing of specific cells.

|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
Originally posted by ambush:
1st Suggestion: RTFM.
Hmm, not very good with acronyms.
I think maybe I posted my question wrong. I want to autocomplete text as the user types it into the cell in the outline view. To do this I figure I need to set the delegate of the NSTextFieldCell, but textfield-cell doesn't have a set delegate method. Perhaps I need to subclass a NSTextFieldCell and/or NSControl?
(Last edited by macrophyllum; Mar 10, 2003 at 01:55 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
Instead of a delegate, try using setTarget: and setAction:.
|
|
[vash:~] banana% killall killall
Terminated
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status:
Offline
|
|
Originally posted by Gul Banana:
Instead of a delegate, try using setTarget: and setAction:.
But won't the action only get called when it ends editing? I want some method to get called everytime the user presses a key.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |