• 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
LSOpenFromURLSpec () problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LSOpenFromURLSpec () problems


  • Subject: LSOpenFromURLSpec () problems
  • From: Paul Forgey <email@hidden>
  • Date: Sun, 27 Feb 2005 00:04:43 -0800

I am trying to launch an application with a list of items to open using LSOpenFromURLSpec from Cocoa. The application is inside a file NSURL and the items to open are also file NSURL's inside an NSMutableArray:

            LSLaunchURLSpec spec;

            spec.appURL = (CFURLRef)url;
            spec.itemURLs = (CFArrayRef)[toDoList objectForKey:url];
            spec.passThruParams = NULL;
            spec.launchFlags = kLSLaunchDefaults;
            spec.asyncRefCon = NULL;

            NSLog (@"AppURL:%@ objects:%@", spec.appURL, spec.itemURLs);
            err = LSOpenFromURLSpec (&spec, NULL);
            if (err != 0)
                NSLog (@"Error launching %@: %d", url, err);

NSURL and NSArray are both "toll free bridged" with CFURLRef and NSArrayRef, so I should be fine. Shouldn't I?

From the NSLog which gets executed before LSOpenFromURLSpec, I can see the appURL and files are valid. Once inside LSOpenFromURLSpec, this happens and control is never returned to the caller:

2005-02-26 23:50:09.716 My App[3757] *** -[NSPathStore2 scheme]: selector not recognized
2005-02-26 23:50:09.732 My App[3757] *** NSThread: ignoring exception 'NSInvalidArgumentException' (reason '*** -[NSPathStore2 scheme]: selector not recognized') that raised during delayed perform of target 0x507700 and selector '_didCloseFile:'


I have no idea what to make of this.

_______________________________________________
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


  • Follow-Ups:
    • Re: LSOpenFromURLSpec () problems
      • From: Paul Forgey <email@hidden>
  • Prev by Date: Quickest Way to Open an NSTextAttachment in NSTextView
  • Next by Date: Re: LSOpenFromURLSpec () problems
  • Previous by thread: Re: Quickest Way to Open an NSTextAttachment in NSTextView
  • Next by thread: Re: LSOpenFromURLSpec () problems
  • Index(es):
    • Date
    • Thread