Solved! and new question Re: NSTableView - probably a stupid question
Solved! and new question Re: NSTableView - probably a stupid question
- Subject: Solved! and new question Re: NSTableView - probably a stupid question
- From: Yuhui <email@hidden>
- Date: Sun, 2 Feb 2003 15:26:34 -0600
Hi,
I finally figured out what was wrong. The O'Reilly code uses
NSTableColumnView's identifier: method to match the data in the
dictionary against the cells in a table row. When I checked my
NSTableView in IB, I found that while I had put the correct phrase in
each column's Column Title field, I hadn't done the same for the
respective Identifier field.
To make things more confusing, when I typed in the phrase (the same one
in Column Title) in the Identifier field and pressed Enter, IB would
erase what I had just typed in. The workaround was to delete the phrase
in Column Title, type it into Identifier, then type that back (or
copy-paste) in Column Title. Now my table view works as expected.
I'm not sure if this is the correct way to do it. Shouldn't Column
Title be the same as Identifier for each column? There's no title: or
columnTitle: method in NSColumnView, so that seems to make Column Title
useless. Is this a bug or did I miss something?
Thanks for reading.
Yuhui
I've set up a NSTableView for my app following O'Reilly's online
tutorial
(http://www.macdevcenter.com/pub/a/mac/2001/08/10/cocoa.html?page=4)
(focusing more on setting up the actual table view than coding the
other methods). But for the life of me, I can't figure out why my
NSTableView remains blank! I know that there's something in there
because I can click on the individual rows and scroll using the
scrollbar. So why can't I see anything within the table? Can anyone
point me to any clues?
_______________________________________________
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.