Droplet & Document based on the same time ?

Hi folks!

When I first started writing my application I thought I didn’t need a document based nor a droplet applications. But after some time I’d wish I had a document based app which is a droplet at the same time.

I know you can convert your application to a droplet by adding the on open handler and editing the Info.plist file but what about converting it to document based too ? - But isn’t a droplet already a document based AppleScript ? It can open files right?:confused:

A document based application comes with two handlers, on data representation theObject of type ofType and on load data representation theObject of type ofType with data withData. A Credits.rtf file for in the About Window . An other AppleScript named Document and a .xib file also named Document

Do I just need to add those files (the essentials, i.e. not the Credits.rtf) to my project?

Thanks in advance

Hi,

a document based application allows the user to create custom documents like TextEdit or Numbers.
The purpose of the mentioned handlers is to convert each document into a data format to be able to load and save the documents to disk

Applications like Mail or iTunes are not document based.

I don’t know, what you’re going to accomplish, but I guess you can combine droplet and document based functionality

My goal is : my normal application, when dropping a file on it it opens that file -So I need a droplet. And if it’s possible I’d like to open my own file document -No need to save it.

Isn’t a document designed to open files dropped on it like a droplet? A document-based app should suit you. A droplet would work too, but it would be much harder to design a custom file format unless you are using file read/write. Even if you did use file read/write, you wouldn’t be able to have multi-window capability like TextEdit and the like unless you choose document-based. If by normal application you mean no multi-window, then a droplet should be great.

I went with document based after all. I could drop files on it.