Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 29, 2007, 01:58 AM   #1
vnraju
macrumors newbie
 
Join Date: Jun 2007
my application is not invoking "applicationDidFinishLaunching: " method

in my application....is unable to invoke
applicationDidFinishLaunching: method.........
suggestions plzzzzzz......
vnraju is offline   0 Reply With Quote
Old Oct 29, 2007, 02:05 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Would you care to elaborate on that? Your application should not invoke that method: NSApplication will invoke it automatically on it's delegate if it:

a) has a delegate

and

b) the delegate responds to that message.
robbieduncan is offline   0 Reply With Quote
Old Oct 29, 2007, 02:09 AM   #3
vnraju
Thread Starter
macrumors newbie
 
Join Date: Jun 2007
Quote:
Originally Posted by robbieduncan View Post
Would you care to elaborate on that? Your application should not invoke that method: NSApplication will invoke it automatically on it's delegate if it:

a) has a delegate

and

b) the delegate responds to that message.
thanx for ur reply.....

- (void)applicationDidFinishLaunchingNSNotification *)aNotification
{

NSLog (@"hi welcome");
}

do i need to change anything
this is the piece of code i wrote in that method..........
vnraju is offline   0 Reply With Quote
Old Oct 29, 2007, 02:12 AM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
It's a good idea to use [ code ] (without the spaces) tags around your code to prevent the insertion of

That method only gets called if the object that it is a member of is instantiated and set as the NSApplication delegate. Are you doing that (if so where). Personally I normally create an instance of my application delegate and connect it in MainMenu.nib.
robbieduncan is offline   0 Reply With Quote
Old Oct 29, 2007, 02:15 AM   #5
vnraju
Thread Starter
macrumors newbie
 
Join Date: Jun 2007
Quote:
Originally Posted by robbieduncan View Post
It's a good idea to use [ code ] (without the spaces) tags around your code to prevent the insertion of

That method only gets called if the object that it is a member of is instantiated and set as the NSApplication delegate. Are you doing that (if so where). Personally I normally create an instance of my application delegate and connect it in MainMenu.nib.


thank u so much that works fine ...i forget to connect to tha delegate............
vnraju is offline   0 Reply With Quote
Old Oct 30, 2007, 11:50 PM   #6
satyam90
macrumors regular
 
Join Date: Jul 2007
Location: Bangalore, India
Send a message via Yahoo to satyam90
what is the code to connect that function to a delegate.
How to declare a delegata and connect it to a function?
Can you please let me know.
satyam90 is offline   0 Reply With Quote
Old Oct 31, 2007, 12:11 AM   #7
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
The first question makes no sense. You do not connect "functions" (which are really called methods) to delegates

A delegate is simply an instance of an object. So you create a new class that implements the required methods.

You can then either create an instance of this object in your code and connect it to another object via the setDelegate: method, or you can instantiate this class in your nib and connect it there via the normal connection dragging method.

All of this is covered in any basic Cocoa introduction/tutorial.

I suggest you start reading
robbieduncan is offline   0 Reply With Quote
Old Oct 21, 2010, 05:50 PM   #8
spudwaffle
macrumors newbie
 
Join Date: Oct 2010
Outside of Delegate?

Is there a way to use this method outside of a delegate?
spudwaffle is offline   0 Reply With Quote
Old Oct 21, 2010, 08:29 PM   #9
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Quote:
Originally Posted by spudwaffle View Post
Is there a way to use this method outside of a delegate?
You can subscribe to NSApplicationDidFinishLaunchingNotification notifications in any class.
kainjow is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
OMG! - Most of my Mac Applications are not responding xDeathReaperx Mac Applications and Mac App Store 11 Jan 13, 2011 11:03 PM
My Application is Possessed by the Devil !!! flummoxed iPhone/iPad Programming 8 Dec 24, 2010 06:20 PM
I get a message telling me this application is not made to work with iPhone. planetmiller iPhone Tips, Help and Troubleshooting 0 Sep 3, 2010 05:01 PM
Weather application is not giving the right temperature Big Byte iPhone Tips, Help and Troubleshooting 8 Jan 18, 2010 05:41 PM
mail application is not good enough for her.... whyrichard Mac Applications and Mac App Store 4 Feb 15, 2007 12:28 AM


All times are GMT -5. The time now is 09:45 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC