multiple table views
multiple table views
- Subject: multiple table views
- From: Francisco Tolmasky <email@hidden>
- Date: Tue, 22 Apr 2003 17:44:58 -0700
Currently my document class contains 5 different table views (with no
more than 2 visible at any given time). my data source/delegate
methods are beginning to get kind of sloppy. For example:
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)aRowIndex;
{
if(aTableView==_someTableView)
{
do stuff, return stuff;
}
else if(aTableView==_someOtherTableView)
{
do other stuff, return otherstuff;
}
if(aTableView==_tableView3)
{
do stuff, return stuff;
}
if(aTableView==_someTableView)
{
do stuff, return stuff;
}
// so on
}
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
if(aTableView==_someTableView) return number;
else if(aTableView==_someOtherTableView) return yeah;
else if(aTableView==_tableview) return etc;
return soforth;
}
Should I be concerned with this reducing this functions speed? Two of
my table view's are data intensive and thus would enjoy snappy
responses. Are there any solutions to this? Is it worth it/good
programming style to make separate table controllers?
Thanks in advance,
Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
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.