• 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
EINVAL error from NSWorkspace launchApplication in 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EINVAL error from NSWorkspace launchApplication in 10.2


  • Subject: EINVAL error from NSWorkspace launchApplication in 10.2
  • From: Shannon Goodman <email@hidden>
  • Date: Wed, 11 Dec 2002 16:15:54 -0700

Hello all,

I am just starting in on doing some Cocoa developing for the first time and
have stumped myself.

I am launcing an application and am putting some error checking in place.
The problem I have discovered is that when I go to use:
[[NSWorkspace sharedWorkspace] launchApplication:incorrectAppPath];
for an application that I know cannot be found at that particulr path the
launchApplication method is still returning 'YES' even though the app has
not been successfully launched and is not already running. I get this error
in Console:

ERROR! execle(/my/incorrect/path/noApp.app) returned, err=22
(EINVAL error, indicating an invalid argument)

Odder yet is if I put the App back in the correct path and then use
launchApplication I still get true if I do the check:
if(errno == 22)

When I try the above in OS 10.1 none of this happens. I get a return value
of 'NO' from launchApplication and no EINVAL errors, this only happens in
10.2.

I did some digging in you archives and found this mentioned once but no
explanations or work-arounds. I was hoping someone might know some new info.

Thanks in advance!

Shannon Goodman
Software Developer

SMART Technologies Inc.
Tel: 403.802.2427
mailto:email@hidden

Visit the SMART Web site: http://www.smarttech.com
Bringing people and ideas together.(tm)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSURLPboardType: Is this normal?
  • Next by Date: Placing an NSRect into an NSImage
  • Previous by thread: More infos: ObjectAlloc and MallocDebug not working
  • Next by thread: Placing an NSRect into an NSImage
  • Index(es):
    • Date
    • Thread