Re: How make a cocoa lib wich create a window ?
Re: How make a cocoa lib wich create a window ?
- Subject: Re: How make a cocoa lib wich create a window ?
- From: Ken Thomases <email@hidden>
- Date: Fri, 19 Sep 2008 12:51:01 -0500
On Sep 18, 2008, at 11:38 PM, rouanet brice wrote:
I work on a projetc where the executable haven't GUI but I can
launch somme
gui window with plugins.
test <- no gui application
-plugin
-triangle <- this plugin display a triangle in a cocoa window
-rectangle <- this plugin display a rectangle in a cocoa window
All plugins works in standolone applications, but when I launch
test, I cant
see the window.
You need a couple of things. First, you will need to use
TransformProcessType to turn your non-GUI process into a GUI
process. Second, you will need to initialize an NSApplication and
its connection to the window server. Read the class overview for
NSApplication. You will also need to run the event loop somehow.
Normally, this would be done using -[NSApplication run], but you may
be able to get away with just -[NSApplication runModalForWindow:].
Cheers,
Ken
_______________________________________________
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