Using views to draw within custom NSCell subclasses
Using views to draw within custom NSCell subclasses
- Subject: Using views to draw within custom NSCell subclasses
- From: email@hidden
- Date: Thu, 24 Jul 2003 20:54:39 +0000
I have been trying to figure out how to put a progress indicator inside a cell
in a table view. When I searched the mailing list archives, I came across a
post (
http://lists.apple.com/mhonarc/cocoa-dev/msg05464.html) that described
creating an NSCell subclass that "passes off" drawing to a progress indicator
object when requested to draw the cell contents (presumably overriding
NSCell's drawInteriorWithFrame:inView: method).
However, the post is short on details and I'm having trouble visualizing how
that would work. So, let me ask a couple of questions that have been going
through my mind and see if anybody can provide insight:
1. Can I use a class-global progress indicator (PI) instance in the custom
NSCell subclass or does the PI instance need to be a subview of the column
view containing the cells that are candidates for displaying the PI? The
Cocoa documentation on Apple's web site mentions that all NSCell objects share
a single NSText instance for drawing text, but I don't know if that means one
instance per superview or one instance overall. I assume I could do something
similar for a PI.
2. How do I tell the PI to draw its imagery within the bounds of a particular
cell? This is the area where my understanding is the severely lacking.
TIA.
Alan Somers
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.