• 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: How make a cocoa lib wich create a window ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How make a cocoa lib wich create a window ?
      • From: "rouanet brice" <email@hidden>
References: 
 >How make a cocoa lib wich create a window ? (From: "rouanet brice" <email@hidden>)

  • Prev by Date: Re: Drawing an NSImage in a CALayer
  • Next by Date: Re: Core Data adding new instance - creating relationship to existing instance
  • Previous by thread: How make a cocoa lib wich create a window ?
  • Next by thread: Re: How make a cocoa lib wich create a window ?
  • Index(es):
    • Date
    • Thread