interapplication dragging

It appears that it is currently impossible to drag a note from DEVONThink directly into another application. I checked with the developer of a neat writing app called “Scrivener,” and he wrote:

Another commented:

Is this true, and can interapplication dragging from DT Pro be improved?

Actually, that’s not correct.

You can drag a PDF or image document in the DT Pro database onto the Preview icon in the Dock and Preview will open, displaying that file.

The current release does have a bug affecting drag & drop of RTF files (a typo crept in), although RTF files can be correctly exported using File > Export > Files & Folders. Of course, one can open the RTF document, press Command-A to Select All, and drag the text to the insertion point of a Scrivener document.

That problem will be corrected in the next release, and has been corrected in the beta version I’m using.

So I can, indeed, drag and drop RTF and RTFD documents from DT Pro onto the Scrivener icon in the Dock and they become clippings in Scrivener.

And I can drag a Papyrus document from my database onto the Papyrus icon in the Dock, and Papyrus will launch and open the document.

Can you drag and drop RTF documents from DT Pro directly into the “Research” folder in Scrivener as well?

Some yes, some no.

Scrivener seems to behave very oddly, at first blush.

Many of my RTFD documents are selected text/images captured from Web pages. They are RTFD. I can drag them to the Desktop, or to the TextEdit icon in the Dock, or to the iText Express icon in the Dock. Works great.

But if I drag them to the Scrivener Dock icon, or to the Clippings folder, or to the Research folder, they are converted to Web pages, complete with all the material that I hadn’t wanted to capture.

Of course, DT Pro retains in the metadata of those documents the URL of the page from which the capture was made. Without haven asked Christian, I’ll speculate that when version 2.0 is released and I can have multiple databases open, the metadata will accompany dragging a document from one database to another. Apparently, Scrivener "sees’ the document as HTML rather than RTFD, based on the URL. Note that if I delete the URL from the document’s Info panel, then drag it to the Scrivener Dock icon, it is captured as a Clipping, but in RTFD file format.

If I drag one of those RTFD documents to the insertion point of a Scrivener page, the contents appear properly.

On the other hand, RTF documents created in DT Pro can only be captured as Clippings. But once in the Clippings folder, they can be moved to the Research folder.

Note that if I drag one of my RTFD files that resulted from capturing selected text/images from a Web page onto the Safari Dock icon, it behaves like Scrivener. Safari “sees” that URL and opens the referenced page.

So, in answer to your original question, can interapplication dragging from DT Pro be improved, my inclination would be to respond that it would be a mistake (especially for future development) to change DT Pro’s behavior.

Scrivener is set up to convert some file types on the fly, and in the case of DT Pro files can “guess” wrong. There are workarounds, e.g. drag some DT Pro file types to the Finder, then drag the Finder file to Scrivener.

As almost no application (including the Dock) seems to support “promised files” (the ones created on demand), the next release will stop using this technology (introduced by Mac OS X 10.2!) when dragging contents (but will still use it when dragging groups).

Not sure what you mean here. Will we be able to drag files from DTP directly into other apps?

Yes. But it’s not the fault of DT that it’s not working currently - applications like the Dock or Scrivener should be able to support the used technology (as DT itself has been supporting this for a long time too).

Can you be a little more specific on what this “technology” or API is called by Apple? I can ask the Scrivener developer.

Just tell him NSFilesPromisePboardType.

Hi,

I’m the developer of Scrivener (and a licensed user of DevonTHINK Personal, too). This thread has been very useful, thank you. I am trying to get Scrivener to work better with DevonTHINK, both for my own uses (this is my first post here so I should say right now that I have been using DT for over a year and also stress how much I love DT), and because there are a lot of Scrivener users who want to store their global research in DT and then later move it over to Scrivener as easily as possible when they are ready to work on a specific writing project.

I have made it clear on the Scrivener forums that this is not down to DT at all, although it will certainly make things easier from my own perspective if DT does drop NSFilesPromisePboardType, which seems not only underused but also underdocumented (I love how in the documentation it just says, “// Perform operation using the files’ names, but without the // files actually existing yet”, as though all situations are that simple). :slight_smile: The problem for Scrivener is that, with promised file types, you don’t know when they will be created. You have to tell the source app where you want to save them, and the source app tells you what the file names will be, but then you have no way of knowing when these files will actually be created. But Scrivener needs to look at the created files to get certain data from them; it also needs to alter the names of the files to which they get saved in the .scriv package, but as far as I can see, using the current technology, there is no way of doing this. And let me stress again that this has nothing to do with DT, but it is entirely down to how promised file types work in Cocoa - as I understand it. Of course, I may be missing something - the DT guys are far more experienced programmers than I am, and I am happy to admit it - but getting the files from DT into the file wrapper that Scrivener uses is therefore a lot harder than it sounds.

The good news is that DT is so flexible that there are other possible solutions. For instance, DT also puts documents on the pasteboard as RTFD data. So for now, I will probably implement it so that Scrivener can accept NSRTFDPboardType directly in the binder, which would at least allow you to get documents out of DT and into Scrivener more easily (and which seems to be how Mori does it). I would still need to address PDF and image files, etc, though.

Anyway, I hope the DT guys don’t mind me posting here. I’m not trying to promote my app; I just wanted to add that this isn’t a DT issue, and that I am doing my best to get Scrivener to work better with DT, as these two programs do work well together in a writer’s workflow, in my humble opinion.

All the best,
Keith

Hi, Keith. As you can tell, I haven’t done programming for many years.

But over the years I’ve seen a great many Apple programming technologies introduced. Some flourish and become important, some don’t – a situation that must often frustrate developers striving for maximum interoperability between OS X applications. :slight_smile:

As a heavy user of DT Pro I often do run into interoperability issues, notably the proliferation of file types as well as issues such as sending information over to Scrivener or other applications.

I usually take the attitude that there must be a kludge – a workaround – to accomplish my purpose. And there always is. So by experiment I found ways to transfer RTFD and RTF files, via kludges, so that the information content (which is the important objective) was transferred into Scrivener.

Users are most satisfied when there’s seamless interoperability between their favorite applications. So here’s to interoperability! Failing that (at least for the time being) here’s to kludges!

Congratulations for developing a writing tool that has become a favorite for many DT/DT Pro users.

Very glad to see you folks talking to each other. I know I’m not alone in hoping for greater integration between DT and Scrivener: they have the potential for a wonderful marriage of convenience.

E

I’ve been using DT Pro with Scrivener for a few months, and I find that I don’t want to drag files between them. DT Pro is my database for a novel, and the only files I want to drag into Scrivener are external: notes on characters, settings, or plot, and multiple drafts of chapters–all written in MS Word.

I always kept these files apart from DTP, to distinguish them from research and avoid complications in searching. But I was frustrated because MS Word has so many limitations when it comes to drafting a book-length project.

Scrivener converts these files to RTF and lets me rename them, see their contents in a 3-pane view, compare them side by side, label them by state of progress, view a synopsis of contents, and track the structural relations. It’s a great writing tool, and I can use it right beside DTP with no problems. (I hope we’ll be able soon to create our own major folders for topics other than Research, People, and Places.)

Bill - thanks for the kind words. It is amazing the number of folks over on my forum who have a similar workflow to one another, which starts in DevonTHINK as a repository for everything, has Scrivener somewhere in the middle for drafting a specific project, and then ends in a word processor (usually Mellel) for refining that project ready for submission.

The next Scrivener beta will allow you to drag single RTF files from DT to Scrivener (taking advantage of the fact that DT puts RTF data on the pasteboard), so this should help those who want this a little (not exactly a solution for dragging multiple files, though - that still requires the intermediate step of dragging to the Finder first). I’ll keep looking out for ways to make it easier for users to transfer work into Scrivener from DT, given the number of (Scrivener) users that are using them together (which will include myself once S1 is out).

Thanks again, this is a really friendly forum you have over here.
All the best,
Keith

P.S. Howarth - check out the new betas on the Scrivener forums (literatureandlatte.com/forum) - it sounds like you are still using Scrivener Gold.

It’s the same problem for DT which is using a simple workaround: Check for several seconds if the files have been created by using a delayed selector and as soon as all files exist (or the timeout is over), import the files. This seems to be working fine and causes almost no performance penalty.

You guys are the best. :slight_smile: I’m one of those DT, Scrivener, Mellel users Keith described and I’m delighted to see this exchange of information, all to help users of both programs use them together. Thanks so much!!

Yes, this is a very friendly forum, much like the Scrivener forum. Robust, well designed programs coupled with a high level of user interactionon on the forums-- friendly, lively exchanges with a high degree of developer involvement as well. Makes me very happy that I’ve chosen so wisely. :slight_smile:

Alexandria

PS Bill, I’m finished with my entire first draft of my dissertation, and am onto revisions (relatively minor ones)! I hope to defend within the next three to four months, if my readers are timely and get their reports in. Very exciting!

PPS Will, I noticed you just joined the Scrivener forum. Welcome there too! Yes, the new Scrivener allows you to create as many folders as you like. And has outlining capabilities as well. It has a few differences from SG, but overall Scrivener is a much improved design. And the betas are rock solid. I’m on beta 4 and I use it constantly. Throughout the entire beta process I haven’t lost one bit of data and had only a couple of minor crashes that Keith quickly corrected.

Christian - thank you very much for the reply and for the workaround. That certainly does seem like the best solution, and I will play around with it this weekend to see if I can implement it in the next version of Scrivener so that users of both apps will find it easier to move research archived in DT into a project in S.

I really can’t praise you guys enough, not only for your fantastic program but for replying to other developers over here… Wow. :slight_smile:

All the best,
Keith

Alexandria,

Congrats on the dissertation draft! Let’s hope the advisers read and approve quickly.

On my comment on Scrivener: I am in fact using the latest beta, and I know it will create folders and subfolders. Right now, my only complaint is those large orange PINS on the notecards, which obscure the headlines. I’d like to have the option of removing them.

Will

In the latest beta of Scrivener (4.1), select Corkboard, go to View/Index Cards and uncheck ‘Show Pins’
Voila! :slight_smile:

Roger,

Many thanks for the tip. May the night above your dingle be starry, boyo.

Will