• 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
Bundle and window server interaction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bundle and window server interaction


  • Subject: Bundle and window server interaction
  • From: "email@hidden" <email@hidden>
  • Date: Mon, 18 Jan 2010 13:43:50 +0000

Can anyone cast any light on the interaction between the bundle structure and the window server?

The following modified Cocoa app main function displays a dialog when run as an app.
If the executable is extracted from the bundle and run it fails (no user interaction allowed).

The thing is that NSApplicationMain() is not executed.
So the window server connection must arise as a result of the executable's existence with a bundle.

Or are my thoughts out of whack (again)?

#import <Cocoa/Cocoa.h>

int main(int argc, char *argv[])
{
	//return NSApplicationMain(argc,  (const char **) argv);

	NSAppleScript *as = [[NSAppleScript alloc] initWithSource:@"display dialog \"hello\""];
	NSDictionary *errorDict = nil;
	[as executeAndReturnError:&errorDict];
	if (errorDict) {
		NSLog(@"%@", errorDict);
		return 1;
	}
}


Regards

Jonathan Mitchell

Developer
http://www.mugginsoft.com






_______________________________________________

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: Bundle and window server interaction
      • From: Dave Keck <email@hidden>
    • Re: Bundle and window server interaction
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: [iphone] Release Navigation View Controller Question
  • Next by Date: Re: Bundle and window server interaction
  • Previous by thread: Re: NSColorPanel question
  • Next by thread: Re: Bundle and window server interaction
  • Index(es):
    • Date
    • Thread