• 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: setting NSSlider floatvalue from different thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting NSSlider floatvalue from different thread


  • Subject: Re: setting NSSlider floatvalue from different thread
  • From: j o a r <email@hidden>
  • Date: Tue, 14 Feb 2006 22:03:21 +0100


On 14 feb 2006, at 21.35, Karim Morsy wrote:

I have read in various documents that one should not manipulate any GUI elements on a thread other than the main thread.

In the general case that's 100% correct.

So can anyone suggest a way how to properly accomplish what I want to do ? any help would be really appreciated.

It depends on what the button is doing when you keep the mouse button pressed. If it's blocking the main thread completely, I don't think that there's much you can do. If, on the other hand, you're just not in the default run loop mode, you should be able to get it working by using this method instead of the regular performSelectorOnMainThread method:


	performSelectorOnMainThread:withObject:waitUntilDone:modes:

Make sure to also pass in the NSEventTrackingRunLoopMode (Or whatever mode is in effect!) with the modes parameter.

j o a r


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >setting NSSlider floatvalue from different thread (From: Karim Morsy <email@hidden>)

  • Prev by Date: Re: NSAttributedString
  • Next by Date: Re: floatValue of nil NSNumber unreliable (was Re: Bug or feature?)
  • Previous by thread: setting NSSlider floatvalue from different thread
  • Next by thread: Re: setting NSSlider floatvalue from different thread
  • Index(es):
    • Date
    • Thread