Re: Loading a .nib?
Re: Loading a .nib?
- Subject: Re: Loading a .nib?
- From: "Michael Ash" <email@hidden>
- Date: Fri, 2 May 2008 23:58:05 -0400
On Fri, May 2, 2008 at 10:50 PM, Graham Cox <email@hidden> wrote:
> OK, that's cool :)
>
> What's involved in setting up a Cocoa runtime environment in such a case?
ObjC gets set up simply by linking to it, so that happens without any
intervention. Foundation can be used with no additional setup as well.
AppKit requires that you initialize it by calling NSApplicationLoad()
before using it for anything else. Fortunately the call can be made
multiple times without harm, so you don't have to worry about anyone
else doing it too.
Otherwise, standard Cocoa caveats apply. If your plugin can get
invoked on secondary threads, keep in mind the thread safety of Cocoa
classes. Also your callbacks may not have autorelease pools, so you
will have to manage your own in that case.
Apple's Carbon-Cocoa Integration Guide goes into more detail:
http://developer.apple.com/documentation/Cocoa/Conceptual/CarbonCocoaDoc/CarbonCocoaDoc.html
Of particular interest here would be the "Using a Cocoa User Interface
in a Carbon Application" section.
Mike
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden