Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
- Subject: Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
- From: Benjamin Stiglitz <email@hidden>
- Date: Tue, 27 Nov 2007 14:26:11 -0800
I am experiencing some strange drawing issues with an NSBrowser that
uses a subclass of NSBrowserCells with the NSBrowserCell also having
a representedObject set. I'm not sure exactly what is causing the
problem, but the issue seems to stem from the fact that
[NSBrowserCell drawInteriorWithFrame:inView:] ends up causing
[CKDirectoryTreeController browser:willDisplayCell:atRow:column:]
(the NSBrowser delegate method) to get called after. Since this
delegate method is where the representedObject is set, when the
drawInteriorWithFrame:inView method gets called first it does not
yet have the correct data to draw correctly. I have compared the
order of the method calls to the SimpleBrowser example and the
browser:willDisplayCell:atRow:column is always called before the
drawInteriorWithFrame:inView method, so the problem is not evident.
Also, any drawing that occurs after these two methods are called in
the "wrong" order is drawn correctly as the node is set going forward.
Bryan, what appearance are you trying to achieve? Getting this
subclassing right on Tiger involves overriding some private methods,
so it’d be best to make sure that it’s really necessary before you
take that route.
-Ben_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden