Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
- Subject: Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
- From: Lakshmi P Shanmugam <email@hidden>
- Date: Wed, 14 Oct 2015 16:14:22 +0530
Thanks for your response.
Here is the use-case when this happens.
Hover over a cell in a Table. Framework calls NSCell
expansionFrameWithFrame:inView. And then calls NSCell cellSize. In our
overridden implementation of cellSize, we try to get the graphics context
using currentContext. This worked fine in all previous versions upto OSX
10.11 and started failing now.
Any idea on what could be wrong?
Thanks & Regards,
Lakshmi
On Mon, Oct 12, 2015 at 8:36 PM, Ken Thomases <email@hidden> wrote:
> On Oct 12, 2015, at 6:45 AM, Lakshmi P Shanmugam <
> email@hidden> wrote:
>
> > I'm running our application on OSX 10.11. NSGraphicsContext
> > currentContext() returns nil in one of the drawing methods.
>
> What drawing method and who called it, you or the framework?
>
> For example, I recently worked with somebody who was calling -drawRect:
> themselves, which is never valid. The context won't be set up in that case
> because the framework is the one who sets it up prior to calling -drawRect:
> (which is why calling it yourself isn't valid).
>
> Regards,
> Ken
>
>
--
*Lakshmi*
_______________________________________________
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