Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Events, drive mounts



Thanks, it works!

--S

On 6/8/05, David Jeffery <email@hidden> wrote:
> Take a look at NSWorkspace.  You will need to do something like this:
> 
> 
> - (void)awakeFromNib
> {
>      ...
> 
>      NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
>      NSNotificationCenter *notificationCenter = [workspace
> notificationCenter];
> 
>      [notificationCenter addObserver: self
>                             selector: @selector(didMount:)
>                                 name: @"NSWorkspaceDidMountNotification"
>                               object: workspace];
>      ...
> 
> - (void)didMount: (NSNotification *)notification
> {
>      NSString *device = [[notification userInfo] objectForKey:
> @"NSDevicePath"];
>      ...
> 
> 
> David
> 
> On Jun 8, 2005, at 15:47 , Shon wrote:
> 
> > Is there a Cocoa framework for registering for events?  Specifically,
> > drive mount events.  The only code sample I've found is
> > CarbonCocoaTempConverter, which calls Carbon APIs for registering for
> > events.  The search results return the Carbon API documentation for
> > event handling.  Does a "pure Cocoa" event handling API (Framework?)
> > exist?
> >
> > Thanks for your help!
> >
> > --Shon
> >  _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Cocoa-dev mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/cocoa-dev/djeffery-lists%
> > 40comcast.net
> >
> > This email sent to email@hidden
> >
> 
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Events, drive mounts (From: Shon <email@hidden>)
 >Re: Events, drive mounts (From: David Jeffery <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.