Skip navigation.
 
mlRe: Problems with NSApplication Delegates
FROM : Bruce Truax
DATE : Sat Dec 04 22:47:26 2004

On 12/4/04 11:25 AM, "j o a r" <<email_removed>> eloquently wrote:

>
> 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
>
>


I changed the delegate to another controller class (which I had wired as the
delgate in IB long ago and then forgot) and now it works.

Thanks for the suggestion.

Bruce

Related mailsAuthorDate
mlProblems with NSApplication Delegates Bruce Truax Dec 4, 15:19
mlRe: Problems with NSApplication Delegates j o a r Dec 4, 17:25
mlRe: Problems with NSApplication Delegates Bruce Truax Dec 4, 22:47