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

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

  • Follow-Ups:
    • Re: ObjC question
      • From: Aaron Burghardt <email@hidden>
References: 
 >ObjC question (From: Tony Romano <email@hidden>)
 >Re: ObjC question (From: Kevin Brock <email@hidden>)
 >Re: ObjC question (From: Tony Romano <email@hidden>)

  • Prev by Date: Cant read second table from same sqlite database iphone
  • Next by Date: Re: NSInvocation error when closing a dirty document
  • Previous by thread: Re: ObjC question
  • Next by thread: Re: ObjC question
  • Index(es):
    • Date
    • Thread