NSCell subclassing to contain other NSCells
NSCell subclassing to contain other NSCells
- Subject: NSCell subclassing to contain other NSCells
- From: email@hidden
- Date: Fri, 02 Dec 2005 17:39:40 +0000
I'm looking for an attack strategy on subclassing an NSCell.
Here's a simplified scenario of what I want to do. This scenario is only for the sake of discussion.
I have a list of books I allow people to borrow all the time. I want to list my books as NSCells within an NSMatrix. Within each cell I want to have a large thumbnail of the book cover, the title and author of the book and 2 controls under the title and author information. These controls are...
1. Button to allow me to set whether book is being borrowed or not
2. Text field to allow me to type the name of the person that has the book.
What I think I should do is create a subclass of NSCell (say BookCell) and use member variables for other NSCells (NSImageCell, NSTextCell, NSButtonCell, NSTextFieldCell) within it and control them all independently. But, I can't figure out how to have my NSCell treat these other cells similar to an NSView containing subviews. I was hoping for something similar to NSView's addSubview method to allow me to have subcells, but no such thing exists that I could find.
Any assistance would be appreciated.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden