I also note this in the documentation:

"FSEventStreamGetLatestEventId() -> Initially, this returns the sinceWhen value 
supplied when the stream was created; thereafter, it is updated with the 
highest-numbered event ID mentioned in the current batch of events just before 
invoking the client's callback. Clients can store this value persistently as 
long as they also store the UUID for the device (obtained via 
FSEventsCopyUUIDForDevice()). Clients can then later supply this event ID as 
the sinceWhen parameter to FSEventStreamCreateRelativeToDevice(), as long as 
its UUID matches what you stored. This works because the FSEvents service 
stores events in a persistent, per-volume database. In this regard,the stream 
of event IDs acts like a global, system-wide clock, but bears no relation to 
any particular timebase."

So, are you also storing the UUID and using 
FSEventStreamCreateRelativeToDevice? Sounds like you're not.

--Graham





On 29/01/2010, at 11:22 PM, Chris Idou wrote:

> Firstly, the documentation as I read it says you can store the last event id, 
> and pass that to FSEventStreamCreate next time to carry on where you left 
> off. However what I'm seeing if I do that, is it immediately resends me that 
> event. So lets say I process event 877921818. I store that and exit the 
> program. Next time I pass 877921818 to FSEventStreamCreate and I immediately 
> get another callback with event id 877921818, so I end up processing it again.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to