• 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: Where in a prefPane can I do some polling, and then update the UI?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where in a prefPane can I do some polling, and then update the UI?


  • Subject: Re: Where in a prefPane can I do some polling, and then update the UI?
  • From: publiclook <email@hidden>
  • Date: Wed, 28 May 2003 12:59:05 -0400

- (void)doSomethingPeriodically:(id)someArg
{
// do something
[self performSelector:@selector(doSomethingPeriodically:) withObject:someArg afterDelay:1.0];
}


On Wednesday, May 28, 2003, at 11:54 AM, Oscar Morales Vivs wrote:

NSTimer is your friend. Check it out.

On Wednesday, May 28, 2003, at 17:12 Europe/Madrid, Sean McBride wrote:

Hi all,

I have a prefPane (inherits from NSPreferencePane, runs in System
Preferences) and I need to periodically poll for new information and
update the UI based on the results. (Yes, polling is bad, but I have no
choice due to a known CoreAudio bug: the
kAudioDevicePropertyDeviceIsRunningSomewhere callback does not work.)

But where can I do this polling? AFAICT I don't have access to any kind
of event loop or anything else than runs periodically. Should I create a
thread that polls and sleeps? Will I then have issues with 2 threads
updating the UI at once?

Thanks for any pointers!

--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Mac Software Designer +1-514-822-6000
Matrox Electronic Systems Ltd. Montrial, Quibec, Canada
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



/*
Oscar Morales Vivs

Eternal Computer Science Student. Master of C++ Templates. Cocoa Nut. Computer Graphics Illuminati. UI Guru in Training. Dabbler in all things CS and most which are not.

Web stuff: http://homepage.mac.com/oscarmv/index.html
*/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Where in a prefPane can I do some polling, and then update the UI?
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Where in a prefPane can I do some polling, and then update the UI? (From: Oscar Morales Vivó <email@hidden>)

  • Prev by Date: Re: Ask Before Quite,Save Read info
  • Next by Date: Re: Attributes in a string
  • Previous by thread: Re: Where in a prefPane can I do some polling, and then update the UI?
  • Next by thread: Re: Where in a prefPane can I do some polling, and then update the UI?
  • Index(es):
    • Date
    • Thread