OutlineView doesn't display correct cell [SOLVED]
OutlineView doesn't display correct cell [SOLVED]
- Subject: OutlineView doesn't display correct cell [SOLVED]
- From: Tom Sutcliffe <email@hidden>
- Date: Sun, 20 Jul 2003 21:33:41 +0100
I came across this problem recently but found a solution just before
posting to the list. So, just for the archives...
The DragNDropOutlineView AppKit example does something really nasty
which can trip you up if you base a project on its implementation of
ImageAndTextCell. I used this cell but changed the NSImageCell to an
NSButtonCell, and had strange problems with redrawing when clicking on
rows in the OutlineView before releasing the mouse button. These went
away when I changed the implementation of copyWithZone to copy the
extra cell I used instead of retaining it (which is what the example
does). Obviously copyWithZone should always create "a functionally
independent object" which for some odd reason is essential in
NSOutlineView's row highlighting technique.
Just a heads up for anyone wondering why on earth their example-based
OutlineViews don't work as planned.
Regards,
Tom
_______________________________________________
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.