• 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: NSApp problem outside of bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApp problem outside of bundle


  • Subject: Re: NSApp problem outside of bundle
  • From: Peter Mulholland <email@hidden>
  • Date: Mon, 29 Jun 2009 21:03:30 +0100

Hello,

> What's going on? What is NSApp trying to do that falls over when it's not in a bundle, or in another apps bundle on 10.4?

I've solved it. The problem was that [NSApplication sharedApplication] did not add the app to the Dock for some reason. The following code solves that:

	ProcessSerialNumber psn;
	GetCurrentProcess(&psn);
	TransformProcessType(&psn, kProcessTransformToForegroundApplication);

This is probably naughty, but it does work. I do this directly after the call to [NSApplication sharedApplication].

BTW Yes I know about kCurrentProcess. It doesn't work. Passing that to TransformProcessType() causes a crash.

--
Best regards,
 Peter                            mailto:email@hidden

_______________________________________________

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: NSApp problem outside of bundle
      • From: "Stephen J. Butler" <email@hidden>
References: 
 >NSApp problem outside of bundle (From: Peter Mulholland <email@hidden>)

  • Prev by Date: Re: Load File Faster.
  • Next by Date: Re: NSApp problem outside of bundle
  • Previous by thread: NSApp problem outside of bundle
  • Next by thread: Re: NSApp problem outside of bundle
  • Index(es):
    • Date
    • Thread