• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
      • From: Corbin Dunn <email@hidden>
References: 
 >NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems (From: Bryan Hansen <email@hidden>)

  • Prev by Date: Re: Document with Multiple Windows
  • Next by Date: CALayer - delegate not being called?
  • Previous by thread: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
  • Next by thread: Re: NSBrowser drawInteriorWithFrame called before willDisplayCell, causing display problems
  • Index(es):
    • Date
    • Thread