Skip navigation.
 
mlRe: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
FROM : Benjamin Stiglitz
DATE : Tue Nov 27 23:26:11 2007

> 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_removed>)

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:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>

This email sent to <email_removed>

Related mailsAuthorDate
mlNSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems Bryan Hansen Nov 27, 01:47
mlRe: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems Benjamin Stiglitz Nov 27, 23:26
mlRe: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems Corbin Dunn Nov 28, 01:40
mlRe: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems Bryan Hansen Nov 29, 20:24