David Scheidt wrote:
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 ....
Assuming the tableviews have a different delegate type for Foo, Bar,
or Quox, you could put an evenColor method in the delegate. Then
check it with respondsToSelector: before messaging. The choice of
evenColor then always changes with the delegate-type, regardless of
tag value.
Just a thought.
-- GG
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com