Noah, yes, thanks, I think that is it. I spoke too soon in my 
that-works-perfectly announcement, but this must be the right track to follow.
It's not clear to me when needsDisplay is being cleared in the view; I need to 
look into this a little more. So far, needsDisplay is sticking on, or appears 
to be.

Jeff

On Feb 4, 2016, at 4:19 PM, Noah Desch wrote:




The `needsDisplay` property will tell you if there are any pending draw 
requests since the last time the view was drawn, is that what you are looking 
for?

-Noah 


> On Feb 4, 2016, at 6:07 PM, Jeff Evans <jev...@ars-nova.com> wrote:
> 
> Suppose one wants to do a task in an NSView only once it has no drawRect 
> calls pending. Is there any way to tell, for a particular NSView, if there 
> are any drawing events coming up? Whether, that is, the view is up to date?
> 
> I've tried counting my explicit uses of setNeedsDisplay and decrementing that 
> count at drawRect, but the trouble is that one can call setNeedsDisplay many 
> times and that will not translate into the same number of drawRects.
> 
> One idea was to call getRectsBeingDrawn at drawRect and hope that the number 
> of rects is equal to the number of update requests combined into that call. 
> But the number of rects does not appear to equal the number of draw requests.
> 
> But there must be some place that contains a queue of upcoming draw requests. 
> If so, is there access to it? 
> 
> I'm hoping this is a dumb question.
> 
> Thanks, Jeff
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/deschnl%40me.com
> 
> This email sent to desc...@me.com



--
If this email is spam, report it to
https://support.onlymyemail.com/view/report_spam/MTAxOTYyOjE4NDk5MTIzNDg6amV2YW5zQGFycy1ub3ZhLmNvbTpkZWxpdmVyZWQ



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to