• 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: Custom NSView / NSToolbar drawing woes [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom NSView / NSToolbar drawing woes [SOLVED]


  • Subject: Re: Custom NSView / NSToolbar drawing woes [SOLVED]
  • From: João Varela <email@hidden>
  • Date: Fri, 30 Nov 2012 12:24:42 +0000
  • Thread-topic: Custom NSView / NSToolbar drawing woes [SOLVED]

Thank you for your reply. It seems as though when you make a thorough
explanation in writing of what your problem is then the right solution is
found more easily. :) I struggled with this problem for a week and
couldn't, for the life of me, find out what the problem was; that is why I
posted my problem here. However, my description led me to comment out all
the drawing code and then reinsert this code line by line until I found
the line of code that was messing the toolbar up. The offending line of
code was an unbalanced call to store the graphics context. Once removed
the problem went away. I'm somewhat amazed of how such a "small" mistake
could mess up the toolbar drawing so much.


On 30/11/12 05:20, "Graham Cox" <email@hidden> wrote:

>When your custom view is activated, it should be made first responder,
>which is responsible for validating the toolbar - check out
>NSUserInterfaceValidation.
>
>Your -drawRect: does not need to account for the toolbar (but it also
>should take some care not to mess up the graphics environment, though
>that is hard to do - I doubt that's the problem)
>
>--Graham
>
>On 30/11/2012, at 2:32 PM, João Varela <email@hidden> wrote:
>
>>



_______________________________________________

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


References: 
 >Re: Custom NSView / NSToolbar drawing woes (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: FileWrapper & iCloud
  • Next by Date: NSApplicationScriptsDirectory access for helper tool
  • Previous by thread: Re: Custom NSView / NSToolbar drawing woes
  • Next by thread: NSUserUnixTask and the sandbox
  • Index(es):
    • Date
    • Thread