Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > Mac OS X Development Forums > Mac OS X Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-24-2010, 10:16 AM   #1 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 9
Default Noob Question: Where did this programm start? Which class/ Which function?

Sry but I'm really confused.
Here the sample Code:
CocoaSlides
I searched the programm and uncomment all functions which I think the programm starts... or makes the first functioncall. But i didn't get it...

Sorry for this Noob Question!!!

But I really don't know where in the code the programm "begin".
Any hints?

Thank you.
Ocramj is offline   Reply With Quote
Old 02-25-2010, 08:26 AM   #2 (permalink)
Mobile and Web solutions
 
hello24's Avatar
 
Join Date: May 2009
Location: London, UK
Posts: 72
Send a message via Skype™ to hello24
Default

It starts in main.m
hello24 is offline   Reply With Quote
Old 02-25-2010, 11:51 AM   #3 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

As you noticed, main.m is really short:

Code:
int main(int argc, char *argv[])
{
    return NSApplicationMain(argc, (const char **) argv);
}
However, when the function NSApplicationMain is called it checks info.plist to find out what .xib file to load. You'd have to download the whole package to see that info.plist references MainMenu.xib, which has a reference to MainController.m. That's where applicationDidFinishLaunching is, and the first line of your app code that gets run.
__________________

Free Games!
smasher is offline   Reply With Quote
Old 02-25-2010, 12:05 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2010
Posts: 9
Default

I didn't know the step with the info.plist
Thank you!

The reference from MainMenu.xib to MainController.m is in the Inspector under Outlets: "delegate" --> MainController?
Ocramj is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 259
20 members and 239 guests
14DEV, @sandris, ADY, ArtieFufkin10, bookesp, ckgni, Dani77, DarkAn, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, MACralik, NSeven, prchn4christ, Rudy, Speed
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0