Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Graham Cox
On 30/01/2010, at 12:31 AM, Chris Idou wrote: > No, I'm not using FSEventStreamCreateRelativeToDevice, I'm using > FSEventStreamCreate. What you quote is only relevant to > FSEventStreamCreateRelativeToDevice. > Yes, that's the point. What the documentation appears to be saying is that if yo

Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Matt Gough
Are you checking that that first event doesn't have the kFSEventStreamEventFlagHistoryDone flag set? Matt On 29 Jan 2010, at 12:22:38, Chris Idou wrote: > It seems like if you pass an explicit event id into FSEventStreamCreate in > absolutely insists on giving you an immediate callback that so

Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Chris Idou
2010 11:33:40 PM Subject: Re: FSEventStreamCreate and File System Events Wierdness 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

Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Chris Idou
To: Chris Idou Cc: cocoa-dev@lists.apple.com Sent: Fri, 29 January, 2010 11:27:31 PM Subject: Re: FSEventStreamCreate and File System Events Wierdness Well, I have no experience of this API, but perhaps it's designed to do this so that when you restart a stream, you get an event that gives yo

Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Graham Cox
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 ca

Re: FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Graham Cox
Well, I have no experience of this API, but perhaps it's designed to do this so that when you restart a stream, you get an event that gives you a snapshot or starting point for the new session. Seems to me it would be trivial to compare the event ID and if it's the one you just passed in, ignor

FSEventStreamCreate and File System Events Wierdness

2010-01-29 Thread Chris Idou
I'm trying to use the file system events api, but what I'm seeing seems wierd. 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 re