Re: ObjC question
Re: ObjC question
- Subject: Re: ObjC question
- From: Seth Willits <email@hidden>
- Date: Sat, 10 Apr 2010 18:11:59 -0700
On Apr 10, 2010, at 5:11 PM, Tony Romano wrote:
> When you create the file system event, you can pass a void * via the structure which is accessible in the event callback. In this pointer, I want to pass my Volume object so I know which volume the event was for. I could have easily passed the volume object pointer in when I create the FileSystemEvent object but I always like to stretch my thinking.
I'm not sure how this relates to your previous question. I think you may have misspoken/left something out above.
I'm guessing you meant that when you setup the FSEvent callback, you're passing in the FileSystemEvent object instead of the Volume object? In the callback, in order to use the Volume, the FileSystemEvent would need a reference to the Volume. Otherwise you'd need to pass the volume to the callback and get the FileSystemEvent object from the Volume.
Additionally, you could also create a struct which separately contains references to both the FileSystemEvent and the Volume if for some reason you don't have and don't want a reference to the Volume in the FileSystemEvent.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden