Hi Omar, This confused me as a beginner as well. The AppController object is probably instantiated in the application's main nib/xib/gorm file (probably MainMenu.gorm), and it is set as the application's delegate by a connection made in Gorm/InterfaceBuilder.
So, you have a sequence of events like this: -main() calls NSApplicationMain -the application's Info.plist is parsed and the main nib file listed there is loaded -the nib usually contains an application delegate object, which is connected to the delegate outlet of the NSApplication object - your delegate's methods such as applicationWillFinishLaunching should now get called Hope this helps Eric On 2011-10-28, at 12:51 PM, Omar Campos wrote: > Hi all, > > After a few months of first discovering GNUStep, I finally decided to read > some tutorials on it, to really learn more about it. I am currently reading > about the shared application object and its delegate. According to the > tutorial, I create an object and implement some methods that control the > app's behaviors, such as, > > - (void) applicationWillFinishLaunching: (NSNotification *)not > > and then set this object as the application's delegate using [NSApp > setDelegate]. So I created a new project in ProjectCenter, to see how this > works in the default project template. It seems that the application > delegate is an instance of a class called AppController, implemented in > AppController.m. There is also a main source file which calls > NSApplicationMain(). However, I can't seem to find any place in the code > where this class is instantiated and set as the application delegate. So, > where does ProjectCenter set this up? How does the program know which class > it needs to set as the app delegate? Thanks for any info. > > Sincerely, > Omar Campos Rivera > _______________________________________________ > Discuss-gnustep mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/discuss-gnustep
_______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
