tables and cells
tables and cells
- Subject: tables and cells
- From: nicolas berloquin <email@hidden>
- Date: Wed, 22 May 2002 21:56:26 +0200
Hi !
I don't know why but there is still something I don't understand about
cells (inside a matrix for example), and I believe my problem lies
around the concepts themselves...
My troubles come from the mythical "calculator" that everyone seems to
quote: ie instead of having 100 NSViews that handle the drawing of the
buttons and the clicking
someone had the idea to separate those functions, and create an NSButton
and an NSButtonCell.
Alright, roger 5/5
now, when I create a matrix with a custom class, the matrix creates n
instances of my class, one for each "cell".
I can have all of those instances point (target: action:) to a single
object, no problemo.
but why create n instances of the view ? shouldn't there only be one ?
this was part one, now, my current problem:
in the cells of my matrix, I draw an NSImage (which now updates right
(for those who read the previous posts)), and I want some
text drawn just under the image.
- I tried using an NSString and drawing in a rect, but a lot of cropping
problem show up, and I'd need something more elaborate.
- I tried with an NSTextField, but it won't show (unless I AddSubview it)
- do I have to create an NSTextView and AddSubview it to the matrix'
controlView ? This seems real heavy, thinking I might have
1000 of those textviews...
so which is the lightest and most efficient way of doing it ?
thanks ;-)
_______________________________________________
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.