• 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: Slight problem with updates in NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slight problem with updates in NSTableView


  • Subject: Re: Slight problem with updates in NSTableView
  • From: j o a r <email@hidden>
  • Date: Mon, 22 Oct 2001 17:17:41 +0200

Thanx for your input Drew,

On Monday, October 22, 2001, at 03:50 , Drew McCormack wrote:

I had something very similar with an NSTextView: it wouldn't update until the mouse moved over it. I suspect that for whatever reason, the program is waiting before getting to the end of the event loop, since I think it does the pending display updates there. So when you call "displayIfNeeded", it flags the view as needing an update, but it only carries the update out later.

You are talking about the NSView's "displayIfNeeded", I was refering to the one in NSWindow. Probably not too much of a difference, and according to the docs:

NSView
"You can also use these methods [Refering to: display and displayRect] to force a view to redisplay itself immediately when necessary."
--
NSWindow
"You rarely need to invoke this method [Refering to: display and displayIfNeeded]. NSWindows normally record which of their NSViews need display and display them automatically on each pass through the event loop."
--

That is, the "display" and "displayIfNeeded" methods should fire immediately. I have also verified by using "viewsNeedDisplay" that the window actually knows about the table view needing to be displayed already after the "reloadData" has been called. Still, even if I call "displayIfNeeded" it doesn't update, only the brute force "display" does the trick.

Telling the table view itself to "display" doesn't work either - even though it knows it should re-display (verifyed by using "needsDisplay"). Only [myWindow display] does the trick - strange.

As Ondra Cada pointed out, it's such a commonly used component it's very unlikely it suffers from such an obvious bug - but what then have I done wrong with my table view? How do I troubleshoot it?

j o a r


References: 
 >Re: Slight problem with updates in NSTableView (From: Drew McCormack <email@hidden>)

  • Prev by Date: RE: what's not to like??
  • Next by Date: Re: help with resource conversion
  • Previous by thread: Re: Slight problem with updates in NSTableView
  • Next by thread: Re: Slight problem with updates in NSTableView
  • Index(es):
    • Date
    • Thread