Hi everyone,

 

I've been going back and forth in my head on a program design decision
and I'd like to get some feedback.

 

My app does a particular kind of search and for each result; I have a
Result class instance that contains all the fun information. I'll be
displaying those results in a TableView, using the View in a cell trick.
The single TableView column is bound to an ArrayController holding all
my results.

 

Right now, each Result has an IBOutlet to a View and loads that view
from a nib. So my ViewCell pulls that view from the Result object value
and adds that view as a subview. That works ok. My dilemma is where I
should put the custom logic for the View (when highlighted change text
color, etc). My gut would say subclass View... but View has no concept
of being highlighted. I suppose I could pass the isHighlighted along
from the Cell to the View but that seems kind of convoluted. Any
thoughts? Am I over-designing this?

 

Josh

 

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to