Elliotte Harold wrote:
>It's not the icons for the documents I care about--the standard icons for
>the relevant file types are all fine--it's the ability to drag and drop
>the right files onto my app in the Finder.
Drag-n-drop of files onto your app's Finder icon is susceptible to the same
"stale Launch Services" problem that lies at the heart of the unchanged
Finder icon.
As previously noted, one way to force LS to update is to copy the app to
another volume, delete it from its original volume ('rm -fR' it or empty
Trash on it), then copy the app back to its original place. BTW, a R/W
HFS+ disk-image is suitable as the other volume.
A mid-point test is trying to drop a file on your app after it's copied to
the other volume and before you copy it back. If it accepts the drop (its
Finder icon hilites), then deleting the original and copying back should
continue to work. If the copy doesn't accept the drop, then something else
may be wonky. For example, I've neglected to fully remove the original app
(once, still in Trash; another time, accidentally duplicated instead of
aliased), and this prevented the newly copied-back app from working
properly, despite the copy sitting on the other volume accepting file-drops
fine.
Another thing that sometimes works is to touch the bundle-dir, thus
signalling Finder and/or LaunchServices that the app has changed. This
doesn't always work, though, so you may end up dancing the double-copy
tango, or using 'lsregister' to force LaunchServices into submission.
>I also want to be able to
>select my app as the default for various file types and "Open With" my
>application.
For an app to be selectable as a default for file-types, I think it requires:
1) a CFBundleSignature other than '????'.
2) a valid PkgInfo file (non-critical as of 10.4, IIRC)
3) a unique CFBundleIdentifier
The unique CFBundleIdentifier is sometimes omitted, and "Jar Bundler.app"
(as distinct from Jar Bundler the Ant task) won't create one for you by
default. Without it, several things will refuse to allow your app to be
chosen. The two things I've seen refused when CFBundleIdentifier is
missing are:
1) setting the app as default "Open With",
2) adding the app to a Simple Finder list of approved apps.
#2 was formerly a limited or restricted account, but is now configured
under the account's Parental Controls for Finder.app & System.
<http://developer.apple.com/qa/qa2004/qa1373.html>
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Arti
cles/PListKeys.html#//apple_ref/doc/uid/20001431-102070>
I think one reason this is all so obscure and arcane is because Xcode
automatically does many of these things for you, so the entire sequence of
steps is simply not well documented in a single place. Another reason is
that the rules for what's necessary have changed with major OS releases.
For example, PkgInfo used to be required, but as of 10.4 (possibly 10.3),
it may be omitted.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden