CLI open -a myApp fileName - not working
CLI open -a myApp fileName - not working
- Subject: CLI open -a myApp fileName - not working
- From: David Hoerl <email@hidden>
- Date: Fri, 16 Jun 2006 21:39:07 -0400
I often use the CLI command "open -a Preview somefile.tif" and it
works just fine. When I try it with my app, I get the following:
open -a /fullPathTo/myApp file.tif
2006-06-16 19:31:23.150 open[13149] LSOpenFromURLSpec() returned -1
for application /fullPathTo/myApp path /anotherfullPath/file.tif.
2006-06-16 19:31:23.152 open[13149] Couldn't open file:
/anotherfullPath/file.tif
I have verified that when I send this command, that my application
never runs at all, so Launch Services has looked at my info.plist (or
whatever) and decided its not worth even trying to let my app open
this file.
So, I figured this open works with TextEdit (open -a TextEdit
somefile.txt) , so I looked at the TextEdit plist file, to make sure
I had corresponding information.
This sort of mimiced what TextEdit uses:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>tif</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>tif.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/tif</string>
</array>
<key>CFBundleTypeName</key>
<string></string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
In addition, I tried setting NSAppleScriptEnabled to YES or NO -
neither setting had any effect.
[I also tried searching the archives for "Launch Services" and "open"
but nothing seemed germane to this and you get an awful lot of hits
that are not relative.]
I'm at a dead end - any pointers appreciated.
David
_______________________________________________
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