cocoa - "Open With" menu for remote files -
i'm getting troubles getting applications associated remote file how has url like: "http://servername/folder/file.png".
the code use is:
... nsurl *url = [nsurl fileurlwithpath:@"http://servername/folder/file.png"]; nsarray *apps = (nsarray *)lscopyapplicationurlsforurl((cfurlref) url,klsrolesall); ...   i try using urlwithstring: result same. correct approach this?
edit after joshua replay:
sorry may bad redaction. problem lscopyapplicationurlsforurl call return nil.
first, -fileurlwithpath: expects file system path @"/users/me/desktop/myfile.png".
second, don't "same" results , wrong them, it's difficult tell problem is.
the docs this:
if item url’s scheme file (designating either file or directory), selection of suitable applications based on designated item’s filename extension, file type, , creator signature, along role specified inrolesmask parameter; otherwise, based on url scheme (such http, ftp, or mailto).
so getting , expect get?
Comments
Post a Comment