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

Re: NSApplication Newbie


  • Subject: Re: NSApplication Newbie
  • From: Dustin Voss <email@hidden>
  • Date: Fri, 5 Dec 2003 16:16:46 -0800

Additionally, the application delegate object is usually (from what I've seen) instantiated in the main NIB file, and is connected to the "delegate" outlet of the file's owner, which will be the NSApplication instance.

You can also set the delegate programatically, in the main() function, but you have to set the delegate before loading the NIB. This means you can't use NSApplicationMain() -- you have to do what it does yourself (see NSApplication docs).

On 4 Dec, 2003, at 6:21 PM, Nathan Day wrote:

Subclassing is used a lot less in Objective-C than in c++, sub-classing of NSApplication is only done in very rare circumstances. Usually you can do what you want with a delegate object for NSApplication. There is a section in the NSApplication that tells you what you can do with delegation. The NSApplication delegate is the usual way to specialize your NSAppliaction for your particular project.

On Friday, December 05, 2003, at 12:46PM, OL&L Dev 2 <email@hidden> wrote:

Hi. I am new to Cocoa.

I was wondering about how to use NSApplication. I am an old
PowerPlant programmer from Mac OS 9, and I am assuming the correct
way to use NSApplication is to create one's own subclass application
class and .h and .m files and then use the subclassed application
class in one's app instead of NSApplication.

This is very similar to the way PowerPlant used to do it.

Is this the correct approach or is there something I am missing?

Thanks

James
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSApplication Newbie (From: Nathan Day <email@hidden>)

  • Prev by Date: Re: drawing performance
  • Next by Date: Re: reading iTunesDB
  • Previous by thread: Re: NSApplication Newbie
  • Next by thread: Re: NSTextField has cursor in it?
  • Index(es):
    • Date
    • Thread