• 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: NSWorkspace question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWorkspace question


  • Subject: Re: NSWorkspace question
  • From: glenn andreas <email@hidden>
  • Date: Tue, 3 May 2005 21:37:51 -0500


On May 3, 2005, at 6:08 PM, rfitz wrote:

I have a screensaver that I want to add a configure sheet to.  Instead
of opening a sheet with the settings I have a helper app that needs to
be launched.  Right now I can launch that application when I click the
Options button from the ScreenSaver preference pane, but after my
helper program launches, the Systems Preferences applications crashes.

What needs to be changed in the code below so after my program
launches, the System Preferences application does not crash?

Thanks,

-Rhon Fitzwater

- (NSWindow*)configureSheet
{
	[[NSWorkspace sharedWorkspace] launchApplication:@"/Applications/My\
Controller.app"];
}


This routine is declared as returning an NSWindow, and you're returning random garbage.


Try adding "return NULL;"


You'll probably also want to use the launch application method that takes a bundle identifier (discussed just the other day here), since hard coding in your applications path isn't such a great idea.



Glenn Andreas                      email@hidden  <http://www.gandreas.com/> oh my! quadrium | build, mutate, evolve | images, textures, backgrounds, art

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSWorkspace question (From: rfitz <email@hidden>)

  • Prev by Date: Re: Is this a bug in Tiger's NSBitmapImageRep?
  • Next by Date: Re: Preferences file in Tiger
  • Previous by thread: NSWorkspace question
  • Next by thread: Can add popups to scroller area?
  • Index(es):
    • Date
    • Thread