[NSColorPanel isContinuous] and [NSColorWell isContinuous]

Apple, Cocoa, General

A quick comment about these two properties: [NSColorPanel isContinuous] and [NSColorWell isContinuous].

Generally, you want these two things to be in sync. Whenever the color changes in the NSColorPanel, the color in the NSColorWell will update. However, the action in the NSColorWell will sometimes not be sent, since it isn’t the thing controlling the mouse. If you set isContinuous to NO on an NSColorWell, but do not call [[NSColorPanel sharedColorPanel] setContinuous:NO], then the color panel is going to keep sending messages to the color well, but the action will never be sent!

The bottom line: make the two properties match!

Next in Cocoa
Your most important breakpoint in Cocoa

Leave a Reply

avatar
500
  Subscribe  
Notify of

As an Amazon Associate I earn from qualifying purchases.

(c) 2008-2019 Corbin Dunn

Privacy Policy

Subscribe to RSS feeds for entries.

81 queries. 0.659 seconds.

Log in