• 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: where is the Apply button on the NSColorPanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: where is the Apply button on the NSColorPanel?


  • Subject: Re: where is the Apply button on the NSColorPanel?
  • From: James DiPalma <email@hidden>
  • Date: Sun, 22 Sep 2002 23:47:41 -0400

From: Bertrand Mansion <email@hidden>

I'd prefer to slow down the number of action messages rather than use
an Apply but had no luck with sending setPeriodicDelay:interval to the
ColorWell's cell either.

I haven't worked much with color wells, so I can't explain some of its behavior.

In continuous mode, it sends a lot of actions. Not continuous, my color well sample didn't send any actions unless I dragged a color into my color well (this color well did change colors with color panel changes, just didn't send any actions).

In IB, a color well's inspector has a color well that will dynamically update when using IB's color panel, but won't update the design window's color well instance until a mouse up occurs (while drag selecting a color). Is this what you are looking for? I don't know how IB does it.

If what you want is to slow down the number of action messages (and not simply get a single action message), you could compare [NSDate date] with your last action message's date to ignore action messages soon after changing your window's color, then use an NSTimer to ensure that you don't ignore the last color chosen.

If someone knows a way to test if NSColorWell is currently in a color changing loop, please say something. If this method existed, you could check sender for during-continuous-change-loop.

You could also try a performAfterDelay:0.0; if NSColorPanel uses nextEventMatchingMask: instead of mouseDragged: to handle dragging around its color wheel selection, performAfterDelay:0.0 won't fire until after a mouseUp:. I don't like this idea because NSColorPanel may one day change to using mouseDragged:, but it probably won't change what it is doing, so if it works, use it.



-jim
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: where is the Apply button on the NSColorPanel?
      • From: ber <email@hidden>
References: 
 >where is the Apply button on the NSColorPanel? (From: ber <email@hidden>)

  • Prev by Date: Re: NSTableView of NSColorWell
  • Next by Date: Re: where is the Apply button on the NSColorPanel?
  • Previous by thread: Re: where is the Apply button on the NSColorPanel?
  • Next by thread: Re: where is the Apply button on the NSColorPanel?
  • Index(es):
    • Date
    • Thread