|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
| I am developing a Java application for Macintosh. I have successfully implemented (via handleOpenFile and pList) that a double click on a file with relevant extension (.txt) will open the application which then reads the file. That works nicely. The Java code handling the Apple event is: public void handleOpenFile(ApplicationEvent e) { path = e.getFilename(); if (appOpen) displayFile(path); e.setHandled(true); } The pList part defining the file extension is: <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>txt</string> </array> <key>CFBundleTypeName</key> <string>MyFile</string> <key>CFBundleTypeRole</key> <string>Viewer</string> </dict> </array> However, I would also like to be able to open and read the file by simply dropping it on the application icon. This does not happen. I have searched a lot of the documentation but havenät found anything recent on this issue. Lars Gislen |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Java-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.