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



The thing I couldn't find in that documentation is how to declare your supported document types. Is there even a way to do this from a Java Web Start application, or do you have to package your app in a .app package?


I am unaware of how to do this from JWS, if it's possible at all.
I assumed you were writing a Swing application with native wrapper.

Your application would define a method named handleOpenFile, implement
MRJOpenDocumentHandler, and register your intent.

Assuming your application has implemented the code as you described,
handleOpenFile would become a wrapper method implemented as:

public class App
implements MRJOpenDocumentHandler
{
public App()
{
...
registerOpenDocumentHandler(this);
...
}

// IMO, rename the original routine to have this name
public void handleOpenFile(File fileName)
{
openFile(fileName);
}
...
}

On Saturday, August 17, 2002, at 06:00 PM, Paul Roebuck wrote:

Well, I got an output file for my app. It feels great to be at this point in development. Project Builder's Target has a way to set the Document Types that application is associated with. I set this to the appropriate settings, I think. Now my application fires up when double clicking the output file which is a good thing. Yet, none of the data in the output file gets loaded into my application's openFile(File myFile) method. This is perfectly sensible. I realize I need to do something. Yet, what could this be...

It could be to read TN2042.

<http://developer.apple.com/technotes/tn/tn2042.html#Section2_5>



--
----------------------------------------------------------
Out of the 10Base-T, through the router, down the T1, over the
leased line, off the bridge, past the firewall... nothing but Net.
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: MRJOpenDocumentHandler (was Re: Document Types in Application Settings) (From: Jeff Martin <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.