Sometimes using 'tag' in this manner is appropriate, but in most
cases, its more descriptive to have an IBOutlet.
That way you can say:
if (tableView == courseListTableView) {
} else if (tableView == studentListTableView) {
}
Jon Hess
On Apr 2, 2008, at 5:41 PM, Adam Gerson wrote:
All good
All good ideas from Andy. I sometimes get arround this issue by using
the "tag" in IB. It has to be an int so I define
#define TABLE1 1
#define TABLE2 2
#define TABLE3 3
Then you can get a reference to your table with
if ([tableView tag] == TABLE3)
{
//code
}
On Wed, Apr 2, 2008 at 6:07 PM, Je
Here's what it _sounds_ like you're trying to do. Let me know if I've
misunderstood:
* You have multiple table views.
* The data source logic for all of them is essentially the same.
* You are trying to have one _instance_ of your data source class be
the data source for all of your table
On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:
How would I get the name of a table view? I am trying to make all
of my tables use one class for the data source so I can make my
code more smaller.
Why does your code need to be smaller? How big is it? This sounds like
something that would real
Your delegate and data source can be the same object if you want.
Nothing prevents it.
Mr. Gecko wrote:
What do you mean by the "name"?
in the identity tab of Interface builder
You could make one class that has all of the common code, and then
subclass it for each table instance. That's a pr
What do you mean by the "name"?
in the identity tab of Interface builder
You could make one class that has all of the common code, and then
subclass it for each table instance. That's a pretty common technique.
I did that before but I can't do shouldSelectRow with that which I
need for fillin
What do you mean by the "name"?
You could make one class that has all of the common code, and then
subclass it for each table instance. That's a pretty common technique.
Mr. Gecko wrote:
How would I get the name of a table view? I am trying to make all of
my tables use one class for the data
How would I get the name of a table view? I am trying to make all of
my tables use one class for the data source so I can make my code more
smaller. I know I can use autosave name but I am not sure if I am
suppose to use that or what it does.
Here is what I have tried already
[tableView nam