Re: Editing items
Re: Editing items
- Subject: Re: Editing items
- From: "M. Uli Kusterer" <email@hidden>
- Date: Tue, 21 Oct 2003 19:35:48 +0200
At 14:07 Uhr +0200 21.10.2003, Norbert Pfaff wrote:
I4m just beginning with Cocoa.
I have a tableView and want to edit the items in two ways.
First I would like to open a new window with to edit. Should I have
therefore a new nib or is it possible to have this window in the
same nib file?
Norbert,
you can easily put it in the same NIB if there will never be more
than one window open. In that case, uncheck that window's "show at
startup" option and its "destroy on close" option, and show/hide it
through an outlet in the file's owner using [theOutletName
orderFront: nil] / [theOutletName orderOut: nil].
If you want to use several windows, use a separate NIB and use
NSNibLoading (or a window controller?) to manage the window.
Second (later) I want to split the part of the window with the
tableview to edit in the lower part of the window.
So, you want to create a split view? You can easily do that by
selecting the two items and choosing "enclose in split view" in IB's
menu. Or what is it you want? A drawer?
Maybe someone has a pointer to examples or classes to look at.
One thing you haven't mentioned yet is whether you want to allow
"in-line" editing of the data in the list, where a list item can be
double-clicked to bring up an edit field for its text. It's
ridiculously easy, because you just implement the
tableView:takeObjectValue:forColumn:row: (or something like that) on
your table view data source. You can also have check boxes, radio
buttons etc. in your table cells, which work roughly the same way.
For a rough example, you can use my NSTableView Assistant, which
generates the source files for a data source, delegate and list item,
and already does the setup of button or checkbox cells. It can be
found on my web site (see sig).
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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.