Re: What type of view for a simple editable list?
Re: What type of view for a simple editable list?
- Subject: Re: What type of view for a simple editable list?
- From: Scott Anguish <email@hidden>
- Date: Wed, 18 Feb 2004 01:00:35 -0500
I think likely you're closer to correct with the tableview.. a text
view doesn't necessarily enforce the required format.
On Feb 18, 2004, at 12:31 AM, Jerry Krinock wrote:
Hi,
In my application I want to give the user a field in which to enter an
arbitrary number of short words or phrases, for example:
brocolli
peanut butter
CD-ROM
So I made an NSTextView which seems to work pretty well; after reading
in
the textStorage I separate each line into a separate string using
componentsSeparatedByString at "\n", which gives me an NSArray of
strings,
which is what I want.
But then I thought, gee this is inappropriate to use this text-oriented
field when the user is actually giving me a list of items. So, I made
an
NSTableView with one column. This seems more "appropriate", but it
looks
like there is no way for the user to type in more items. I'd have to
put a
"Add New Item" button which would add an empty string to the data
source,
which the user would then click on to edit.
So now I think I had it right the first time with the NSTextView.
Am I missing something? What kind of view would you use for something
like
this?
Jerry Krinock
_______________________________________________
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.
_______________________________________________
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.