Monday, June 1, 2009

Copy-paste in Notes is sometimes "native"

When you copy something in an application, the application calls the OleSetClipboard or SetClipboardData APIs to really fill the clipboard content so other applications can use them when you do a paste operation.

Usually you fill the clipboard using many formats and it's OK that the "more representative" format is a native format. For example in Notes when you select things from a RichText field and you copy them, the "Notes Editor Internal" or "Notes Private Data" formats are used.... thus when you paste it inside the same Notes application then Notes will really paste the real content without loosing information. But Notes also copies the "Rich Text Format" that is also known by Word or Notepad.

This behaviour is typical and it's OK.

Problem is when you copy a document from a view. Here the above APIs are not used... Notes fills an internal buffer and it does not use the clipboard. For example if you copy a text (e.g. from Notepad) into the clipboard, then you go to Notes and you select few docs and you copy them then if you go to Notepad again and you paste the content, the original content you copied from Notepad is still in the clipboard! And you can paste the documents in the view at the same time.
The same if you first copy a document from a view, then you copy text from Notepad... you can paste text inside Notepad again and the document inside Notes again: It's like if Notes has a pararell clibpard.
However if instead of Notepad as the source app, you use Notes and you copy text from a Notes rich text field then here the clipboard behaviour is like any other standard application and you loose the last clipboard content.

I think Notes should use the clipboard and among than copying an internal reference (propietary format) that is OK, it should also copy an .ndl file, and the columns concatenated by "," as CF_TEXT.

0 comments:

Post a Comment