Re: NSTextField
Re: NSTextField
- Subject: Re: NSTextField
- From: Ondra Cada <email@hidden>
- Date: Sun, 28 Apr 2002 22:01:27 +0200
On Sunday, April 28, 2002, at 09:45 , James Spencer wrote:
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.
I would really conform to this: it is quite standard that unless you
finished editing, no change is done. Though...
is there a way to get the text typed by the user?
...if you insist, you can use either directly the field editor (see
NSWindow documentation), which actually performs the editing task and thus
contains whatever was typed in, or -- or so I think, never tried that --
some NSFormatter features might be of help here (this latter solution
would be more complicated, but perhaps a tad cleaner).
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.
References: | |
| >NSTextField (From: James Spencer <email@hidden>) |