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

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


  • Subject: 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
  • From: "Amit Jain" <email@hidden>
  • Date: Fri, 27 Oct 2006 15:52:38 +0530

Thanks Dominik. The problem is solved.
-Amit

On 10/27/06, Dominik Pich <email@hidden> wrote:

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


  • Prev by Date: 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: Disconnecting my NSDocument from its Bindings
  • Next by thread: 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
  • Index(es):
    • Date
    • Thread