Simple NSTableView Question - Newbie
Simple NSTableView Question - Newbie
- Subject: Simple NSTableView Question - Newbie
- From: Michael George <email@hidden>
- Date: Wed, 15 May 2002 11:22:38 -0400
Hello!
I am new to OS X and Cocoa, though I am familiar with OO concepts and
I'd played a bit with NEXTSTEP. I come from a Unix background and I am
learning Cocoa so that I can develop GUI apps for OS X.
I have the book "Learning Cocoa" and I am working through it. I am in
Chapter 9 and have just finished working with the NSTableView example.
To expand my knowledge, I want to add a means for adding a new row into
the table. I have made a button for adding a row.
My idea is this:
Have the button send the addRow:selector message MyDataSource to add the
row.
MyDataSource will then add the row and send the noteNumberOfRowsChanged
and reloadData messages to the table view.
However, since the NSTableView contains MyDataSource, there is no handle
for finding out which row is selected or sending the messages to the
TableView.
Since NSTableView doesn't have any methods for adding a row (only
columns) and there is no delegation or notification for adding a row, I
can only presume that my concept of the solution for the problem is
wrong.
This is in the easy part of the tutorials in the book, so I'm sure it's
not a difficult problem to solve. I think I'm suffering a mental
block...
If some kind soul would point me in the right direction, I would greatly
appreciate it.
-Michael George
Senior Engineer, Software Development
Aurora Video Systems, Inc.
_______________________________________________
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.