Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about file dropping on Java app



I have found renaming the application works when the Finder is caching information. If you rename through Finder, of course, then Finder knows about it so that won't work. If you rename your .app directory from the Terminal it works though.

- Josh

On Mar 29, 2005, at 8:35 PM, Bob Hays, Computer Geek wrote:

First, public thanks to Greg for pointing me to lsregister - I figured I put
it in my local Applications folder and that stuff works "like magic."
Nope....


Secondly, the file fails to open when the application isn't running - I also
didn't figure to test with it running, and that works (it does open the
file). So, I'm going to try moving the open code to a static block and see
if that works better. Other suggestions are welcome of course!


And thanks to everyone for helping out!

Have fun! - Bob

P.S. Now if I could get a portable (dongle) install of Mac Firefox to go
with the PC one.... :-) - RLH



On 3/29/05 4:23 PM, "Greg Guerin" <email@hidden> wrote:

"Bob Hays, Computer Geek" <email@hidden> wrote:

I've cloned the XML from an Info.plist for an application that recognizes a
file type, edited it to recognize the type I want, and bundled it all
together.

Using what tool or tools?

If you do it manually, the LaunchServices databases aren't updated. Google
for 'lsregister', or see:
<http://www.macosxhints.com/article.php?story=20031215144430486>



I can double-click the application and it works. The application
itself identifies as a drop target (it highlights when I drag a proper typed
file over it). But, an alias of the application isnπt a drop target
(doesn't highlight when I drag a proper typed file over it)

That's a symptom that the LaunchServices database isn't updated with your
modified app-bundle file-types.


It's also a symptom that the alias-file was created when the app's
Info.plist didn't have any draggable file-types. As I vaguely recall, the
alias-file has its own synopsis of the app's draggable types.



and when I do
drop a file on the application nothing happens.

On the application itself or on the alias to it?

Always, or only when the application isn't already running?

Which API are you using to receive file-drops?

Which Java and OS versions? I realize you said "the latest", but do you
mean 1.4.2Update2 or the 2005-003 SecUpdate?


The MRJ*Handlers have compatibility adapters under 1.4*, but they're
broken.  They don't deliver file-drop events correctly when the app is
launched by the drop.

The EAWT classes do work with file-drop events, unless you have an older
version of Java where that's broken, too.


So the rule is to use EAWT if it's present, otherwise fall back to
MRJ*Handler. And for cross-platform compat, fall back from no MRJ*Handler
to nothing at all.


  -- 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

-- Bob Hays, Computer Geek http://www.alephnaught.com

"As long as opportunity means "change," and as long as change means "pain,"
we will continue to miss our chances."
- Seth Godin



_______________________________________________ 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

_______________________________________________ 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
References: 
 >Re: Question about file dropping on Java app (From: "Bob Hays, Computer Geek" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.