• 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: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode


  • Subject: Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode
  • From: Dominik Pich <email@hidden>
  • Date: Fri, 27 Oct 2006 11:39:30 +0200

Add it to the class that you add as observer (as you pass self the class you call from) in it's init/awakeFromNib
Then add a method test to that class (as you have test as the selector)


-(void)test:(NSNotification)theNotification {
...
}

Am Oct 27, 2006 um 11:33 AM schrieb Amit Jain:

Thanks Sudheer...
But Sudheer one more silly question where should I add this observer,
because what i need is that whenever system awakes (and my application
is running )one event shud be called and inside that event i wud use
this code. I think u might have understood wht i mean to say.

On 10/27/06, Sudheer dantuluri <email@hidden> wrote:


Hi Amit ,

[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
selector:@selector(test)
name:NSWorkspaceDidWakeNotification object:nil];

add the above observer and when ever your system awakes from sleep the above
selector gets called.


- Sudheer.



On 27-Oct-06, at 12:25 PM, Amit Jain wrote:

Hi sherm,
As Iam new to this technology can you please give me a sample code to how to
implement this notification(NSWorkspaceDidWakeNotification)
in objective-c.
I am in trouble please help.
Regards...
Amit Jain


On 10/26/06, Amit Jain <email@hidden> wrote:


thanks i ll try for this and update you soon. Regards.. Amit Jain

On 10/26/06, Sherm Pendley <email@hidden > wrote:
>
> On Oct 26, 2006, at 7:48 AM, Amit Jain wrote:
>
> > I have found one event (event pmgtwake) from this forum only but as
> > i have
> > gone thru it,
>
> What about NSWorkspaceDidWakeNotification?
>
> sherm--
>
> Web Hosting by West Virginians, for West Virginians: http://wv- www.net
> Cocoa programming in Perl:
http://camelbones.sourceforge.net
>
>
>



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40effigent.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:
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: This email sent to email@hidden
References: 
 >how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode (From: "Amit Jain" <email@hidden>)
 >Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode (From: Sherm Pendley <email@hidden>)
 >Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode (From: "Amit Jain" <email@hidden>)
 >Re: Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode (From: "Amit Jain" <email@hidden>)

  • Prev by Date: Re: Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode
  • Next by Date: solved: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode
  • Previous by thread: Re: Re: how to get an event (also name the event) when mac(universal i.e. or min 10.3.9 and above) wakes up from sleep mode
  • Next by thread: NSScrollView bug : can someone confirm ?
  • Index(es):
    • Date
    • Thread