• 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: NSGraphicsContext currentContext() returns nil on OSX 10.11
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
      • From: Ken Thomases <email@hidden>
References: 
 >NSGraphicsContext currentContext() returns nil on OSX 10.11 (From: Lakshmi P Shanmugam <email@hidden>)
 >Re: NSGraphicsContext currentContext() returns nil on OSX 10.11 (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: More Xcode 7 inconsistency?
  • Next by Date: UILabel is maiming my Character
  • Previous by thread: Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
  • Next by thread: Re: NSGraphicsContext currentContext() returns nil on OSX 10.11
  • Index(es):
    • Date
    • Thread