Re: How to programatically close a user opened NSPopUpButton...
Re: How to programatically close a user opened NSPopUpButton...
- Subject: Re: How to programatically close a user opened NSPopUpButton...
- From: Ricky Sharp <email@hidden>
- Date: Thu, 30 Aug 2007 18:18:10 -0500
On Aug 30, 2007, at 6:10 PM, Shawn Erickson wrote:
I have situation in which I have asynchronous network events (pumped
to the main thread via performSelectorOnMainThread:) that result in
the contents of a popup button's menu changing.
If the user has the menu open (user either single-clicked or is
click-holding the control) items will update in the menu however the
sizing of the menu wont change which results in the appearance of a
partially populated menu and/or other related visual inconsistencies.
Any suggestions / opinions on the "right way" to either close an open
NSPopUpButton or otherwise get it to fully display itself?
I could defer the menu update until the menu is closed but I would
prefer to inform the user as soon as possible since a selection they
are about to make may not exist any more.
While it was a different situation that yours, I had to decide how to
handle control-tracking in general when dealing with game AI running
on another thread. I chose to always "enqueue" the thread's result
and wait until control-tracking finished before processing said result.
My take on this was that control-tracking is often done in a short
window of time. Although, I could see keyboard driven access to a
menu may take few to several seconds. Still, I would lean towards
not updating the menu while it was being tracked.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.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