Re: NSApplication subclass and NSTabView
Re: NSApplication subclass and NSTabView
- Subject: Re: NSApplication subclass and NSTabView
- From: Bruno Blondeau <email@hidden>
- Date: Fri, 21 Feb 2003 20:12:16 +0100
on 21/02/03 19:15, Greg Titus - email@hidden wrote:
>
>
On Friday, February 21, 2003, at 10:06 AM, Bruno Blondeau wrote:
>
>
> My application uses a NSApplication subclass and it seems the NSTabView
>
> tries to access NSApp directly instead of my subclass.
>
>
> Can anyone help me? Is this a bug in Cocoa?
>
>
Nope, it's a bug in the way that you are trying to use an NSApplication
>
subclass.
>
>
You should never create an NSApplication object yourself. If you want
>
to use a subclass in your app, just go into the Target settings in
>
Project Builder, click on Info.plist Entries, Simple View,
>
Cocoa-Specific, and change the Principal class field from
>
"NSApplication" to the name of your subclass.
>
>
This will make Cocoa use an instance of your subclass instead of an
>
NSApplication object.
This is what I'm doing.
I'm not creating the object manually, and the Principal class field is
properly set to my subclass name.
What is strange is that if I remove the NSTabView, the application works,
and if I add an empty one again, it crashes...
Even worse, I've just tried to download some sample code with a
NSApplication subclass. Which works, of course. But if I add a NSTabView to
the main window of this working sample, it too crashes.....
Bruno
_______________________________________________
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.