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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to