NSTextField
NSTextField
- Subject: NSTextField
- From: James Spencer <email@hidden>
- Date: Sun, 28 Apr 2002 14:45:28 -0500
I asked this question once before but my formulation of the question was
too vague to get an answer. I've done some more digging but still don't
have an answer so I thought I would try once more.
I'm working through Learning Cocoa's To Do example. In this example
there is a matrix of NSTextFieldCell in which users type tasks to be
done. Using the example code, I'm getting controlTextDidEndEditing
notifications as I should. I don't like how the application works
however. While everything is fine when the user types a task and then
hits a return or a tab, if the user ends editing by clicking somewhere
outside the field, the text typed by the user is not correctly saved.
I've tracked this down to the following in my controlTextDidEndEditing
method:
NSString *newName = [[itemList selectedCell] stringValue];
The problem is that stringValue is empty when the cell was empty before
editing and the editing wasn't ended with a return or a tab. This
strikes me as maybe being a correct user interface but the user
interface of this example application is pretty poor to begin with and
this particular feature doesn't strike me as correct.
is there a way to get the text typed by the user? Once I've got it, I
could easily store it in my document and get the rest of the interface
working the way I've tried to.
Spence
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.