Re: NSTableView reloadData problem (needing 2 TableViews)
Re: NSTableView reloadData problem (needing 2 TableViews)
- Subject: Re: NSTableView reloadData problem (needing 2 TableViews)
- From: "Raymund Beyer" <email@hidden>
- Date: Tue, 26 Nov 2002 00:16:25 +0100
Saratchandra Kongara wrote:
>
Make sure you implement these methods in your controller.
>
// TableView data source methods
>
- (int) numberOfRowsInTableView: (NSTableView *)tableView;
>
- (id) tableView: (NSTableView *)tableView objectValueForTableColumn:
>
(NSTableColumn *)tableColumn row: (int)row;
I need 2 table views, thats why I dont have the methods for the second on
in the controller, but in the data object. Is there a problem with that.
>
Make sure the dataSource target is set for the TableView in IB.
It is.
>
dataSource should be your controller.
I already have the data source for another table view inside the
controller. AFAIK it's not possible (at least not easy to have 2 data
sources for 2 table views in one controller. Also: isn't it better
refarding to MVC paradigm to have the models (data in this case I guess)
in objects?
>
Is it loading the initial data?
There is no initial data, but when I insert "return 10" for the rows and
"Test" for the data, it works immediately.
>
Put some test data in your array and see if the rows show up. For
>
reloading just call [tableView reloadData] after you change the data in
>
the array.
This is exactely what doesn't work...
Thanks anyway.
Ray
---------------------------------
Raymund Beyer
email@hidden
http://www.brainstorm-music.com
http://www.ezee.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.