• 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: Removing delay for a menu in NSSegmentedControl?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing delay for a menu in NSSegmentedControl?


  • Subject: Re: Removing delay for a menu in NSSegmentedControl?
  • From: Mark Munz <email@hidden>
  • Date: Mon, 25 May 2009 12:51:08 -0700

There is an IBAction attached to the segment control that processes
the other segment clicks and does nothing for the menu segment. If I
completely disconnect the IBAction, the menu pops up instantly.

However, if I connect it to an IBAction (even to an empty routine),
the delay returns.

The delay seems to be tied to whether or not there is a Sent Action
attached to the control.

On Mon, May 25, 2009 at 12:35 PM, Dave Keck <email@hidden> wrote:
>> Right now, there is about about a 1-second delay after a click on a
>> segment before its menu will appear.
>>
>> Is there a way to remove this delay in bringing up a menu attached to a segment?
>
> This isn't typical - if you create a new project and just drop a NSSC
> in a window, you'll see there's no delay.
>
> You probably have something executing when the user clicks on it, and
> so the NSSC isn't redrawn to reflect its new state until this code
> finishes. Your best option in this case is to perform these actions in
> the next iteration of the run loop. This can be done using a timer:
>
> [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector:
> @selector(performClickActions) userInfo: nil repeats: NO];
>
> Which will give the NSSC a chance to update immediately.
>
> David
>



--
Mark Munz
unmarked software
http://www.unmarked.com/
_______________________________________________

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: Removing delay for a menu in NSSegmentedControl?
      • From: "email@hidden" <email@hidden>
References: 
 >Removing delay for a menu in NSSegmentedControl? (From: Mark Munz <email@hidden>)
 >Re: Removing delay for a menu in NSSegmentedControl? (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: which temp dir to use?
  • Next by Date: Re: Emulating Carbon menu bevel button?
  • Previous by thread: Re: Removing delay for a menu in NSSegmentedControl?
  • Next by thread: Re: Removing delay for a menu in NSSegmentedControl?
  • Index(es):
    • Date
    • Thread