Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Getting cell being edited from NSOutlineView

Getting cell being edited from NSOutlineView
Thread Tools
Mac Enthusiast
Join Date: Sep 2000
Location: Vermont, USA
Status: Offline
Reply With Quote
Mar 8, 2003, 09:27 PM
 
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
Reply With Quote
Mar 9, 2003, 10:20 PM
 
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)textDidChangeNSNotifi *)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
Reply With Quote
Mar 10, 2003, 01:10 AM
 
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
Reply With Quote
Mar 10, 2003, 05:45 AM
 
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
Reply With Quote
Mar 10, 2003, 09:52 AM
 
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.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:52 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2