• 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: CFRunLoop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFRunLoop


  • Subject: Re: CFRunLoop
  • From: Robert S Goldsmith <email@hidden>
  • Date: Wed, 05 Sep 2001 15:16:54 +0100

Hi :)

Well, I have been learning USB and have created an ObjC class to handle communication with my Rio500 using IOKit and CoreFoundation. In order to be notified when the Rio is plugged in and unplugged, i am currently using CFRunLoop calls to add a source, wait for an event (such as plugging in or unplugging) and then (currently) just printing out the status (plugged / unplugged).

My aim is to integrate this all in a giu to allow people to do cool stuff with the Rio500 - like upload startup splash animations. The CFRunLoop stuff is useful for not only the plugged / unplugged callbacks but also for asyncronous uploading and downloading on the usb pipes. Therefore, i can't just do away with them.

Knowing AppKit has it's own equivalent to CFRunLoopRun (NSApplicationRun), I guessed I should use that instead. However, how do I ask NSApplicationRun to notify me (somehow) when the Rio is plugged and unplugged and when asyncronous operations have finished, like CFRunLoop could do.

Robert

Ondra Cada wrote:

Robert,


Robert Goldsmith (RG) wrote at Wed, 5 Sep 2001 10:48:39 +0100:

RG> Ok, so the Cocoa NSApplication callback structure will directly

There are no callbacks in ObjC (but it the most generic sense of the term). Sending messages beween objects is what you use.

RG> accept CFRunLoop sources/timers? Or do i need to use a different set
RG> of calls to add and remove the sources?

Hm. What's your goal, actually? For timed events you should use NSTimer (or performSelectr:withObject:afterDelay: in the simplest cases which are not worth it). What other sources you mean?
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


  • Follow-Ups:
    • Re: CFRunLoop
      • From: Chris Kane <email@hidden>
    • Re: CFRunLoop
      • From: Andreas Monitzer <email@hidden>
References: 
 >Re: CFRunLoop (From: Chris Kane <email@hidden>)
 >Re: CFRunLoop (From: Robert Goldsmith <email@hidden>)

  • Prev by Date: Re: what's difference and relationship between CoreFoundation and Fou ndation framework
  • Next by Date: Re: Clearing Browser Selection
  • Previous by thread: Re: CFRunLoop
  • Next by thread: Re: CFRunLoop
  • Index(es):
    • Date
    • Thread