Re: figuring out which TableView I am?
Re: figuring out which TableView I am?
- Subject: Re: figuring out which TableView I am?
- From: David Scheidt <email@hidden>
- Date: Mon, 27 Apr 2009 13:15:09 -0400
On Apr 27, 2009, at 11:12 AM, WT wrote:
Perhaps it's time the OP clarified what exactly he had in mind.
Sure. I've got a window. (Actually, there are several windows, but
they're all similar.) It's got a table view along the top. that
table will always have instances of an entity, call it Foo. The
bottom part of the window has details about the particular Foo that
are selected in the top: a bunch of text fields, a graphic, and
another tableView. The tableView is entities of another type that Foo
has a to-many relationship with. There are actually two of these
entities, call them Bar and Quox. The user only sees one of the
tables at time, they're in a TabView. The idea is that tables
representing Foo entities are to have their alternating row color be
FooColor; tables representing Bar entities have the row BarColor;
tables representing Quox, QuoxColor.
I'm setting the stripe color by overriding
highlightSelectionInClipRect:. there's a case statement there
switch ([self tag]){
case 0: //catches the default IB Tag
evenColor = uglyColor;
break;
case 1: // Foo Tables
evenColor = FooColor;
break;
....
default: // catches invalid tag in IB
evenColor = uglyColor2;
}
// drawing code follows ....
There are also secondary windows that allow the user to look at Bars
and Quoxes. Their tableviews are done in BarColor or quoxColor.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden