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

Re: Problems with NSApplication Delegates


  • Subject: Re: Problems with NSApplication Delegates
  • From: j o a r <email@hidden>
  • Date: Sat, 4 Dec 2004 17:25:47 +0100


On 2004-12-04, at 15.19, Bruce Truax wrote:

When I quit the application using the QUIT menu as defined in the default
app these two methods are never called. I also tried [super
setDelegate:self] with the same results. I am sure I am making an obvious
mistake but it is just not obvious enough for me to see.

In general you can't set an object to be it's own delegate, and it doesn't quite make sense.


I think that you should separate the two objects. Create a "application controller" class, as a subclass of NSObject, that is the application delegate. If you need to subclass NSApplication (most of the time you don't), do that separately from your application controller.

j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Problems with NSApplication Delegates
      • From: Bruce Truax <email@hidden>
References: 
 >Problems with NSApplication Delegates (From: Bruce Truax <email@hidden>)

  • Prev by Date: getting another Apps icon
  • Next by Date: Re: getting another Apps icon
  • Previous by thread: Problems with NSApplication Delegates
  • Next by thread: Re: Problems with NSApplication Delegates
  • Index(es):
    • Date
    • Thread