• 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
Detecting 'nop' clicks on an NSPopUpButton?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Detecting 'nop' clicks on an NSPopUpButton?


  • Subject: Detecting 'nop' clicks on an NSPopUpButton?
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 9 Jul 2010 15:14:42 -0400
  • Organization: Rogue Research Inc.

Hi all,

If the user clicks a popup button and reselects the existing selection,
the button still sends its action.  I'd like to treat that as a nop.

Is there a way to detect, from my action method, that the new selection
is the same as the previous selection?

(I can of course do this by checking if the change of state that I would
perform is no different than the current state, but that check would be
different for every popup action I have.  I'm hoping for something I can
apply more universally.  And the reason I want to treat it as a nop is
to prevent the creation of undo actions that don't do anything useful.)

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: Detecting 'nop' clicks on an NSPopUpButton?
      • From: "email@hidden" <email@hidden>
  • Prev by Date: Re: Custom control and cells
  • Next by Date: Re: Another basic CoreData question
  • Previous by thread: EPUB
  • Next by thread: Re: Detecting 'nop' clicks on an NSPopUpButton?
  • Index(es):
    • Date
    • Thread