• 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: Subclass NSApplication in Carbon App?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclass NSApplication in Carbon App?


  • Subject: Re: Subclass NSApplication in Carbon App?
  • From: David Bainbridge <email@hidden>
  • Date: Mon, 31 May 2004 16:58:31 -0500

I came up with the following solution:
#import "/usr/include/objc/objc.h"
#import "/usr/include/objc/objc-class.h"
#import "/usr/include/objc/objc-runtime.h"
.
.
.

((struct objc_class *) NSApp)->isa = [MyApp class];

Any problems with doing this?

On May 30, 2004, at 10:25 PM, David Bainbridge wrote:

> Is it possible to subclass NSApplication when using Cocoa in a Carbon
> app? I have set the principal class in xcode to my NSApp's subclassed
> class and see it in the info.plist of the bundle but the methods I try
> to override are not being called. I have a feeling there is something
> going on within NSApplicationLoad that is used to init the Cocoa
> environment when using it from a Carbon app...
_______________________________________________
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.


  • Follow-Ups:
    • Re: Subclass NSApplication in Carbon App?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Subclass NSApplication in Carbon App? (From: David Bainbridge <email@hidden>)

  • Prev by Date: How to include InternetConfig.h
  • Next by Date: Re: Subclassing an object's creation method (NSBezierPath's +bezierPath)
  • Previous by thread: Subclass NSApplication in Carbon App?
  • Next by thread: Re: Subclass NSApplication in Carbon App?
  • Index(es):
    • Date
    • Thread