Re: Removing delay for a menu in NSSegmentedControl?
Re: Removing delay for a menu in NSSegmentedControl?
- Subject: Re: Removing delay for a menu in NSSegmentedControl?
- From: Dave Keck <email@hidden>
- Date: Mon, 25 May 2009 09:35:23 -1000
> 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
_______________________________________________
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