• 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: NSColorWell shows no color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSColorWell shows no color


  • Subject: Re: NSColorWell shows no color
  • From: Graham Cox <email@hidden>
  • Date: Tue, 30 Dec 2008 21:48:51 +1100


On 30 Dec 2008, at 9:40 pm, tobias assmann wrote:

I know it is an unusual place for setting the color.


It's not unusual, it's wrong.

When the colour well's setColor: method is called, one thing it will do is invalidate itself by calling setNeedsDisplay: which will cause drawRect: to get called again, and so on - an infinite loop, potentially. I suspect Cocoa takes steps to protect itself against this sort of thing by ignoring or suppressing updates flagged from within drawRect: which may be why you don't see anything happen until a click.

Moving the set up to awakeFromNib is definitely more correct though if it's still not working then there's clearly something else going on. Are you sure the colours in the colour list are valid?

--Graham


_______________________________________________

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: NSColorWell shows no color
      • From: tobias assmann <email@hidden>
References: 
 >NSColorWell shows no color (From: tobias assmann <email@hidden>)
 >Re: NSColorWell shows no color (From: Quincey Morris <email@hidden>)
 >RE: RE: NSColorWell shows no color (From: tobias assmann <email@hidden>)

  • Prev by Date: RE: RE: NSColorWell shows no color
  • Next by Date: RE: NSColorWell shows no color
  • Previous by thread: RE: RE: NSColorWell shows no color
  • Next by thread: RE: NSColorWell shows no color
  • Index(es):
    • Date
    • Thread