I just saw one strange thing and I want to know - if possible - if it is my fault or
I have a simple search window with a TextField whose text is selected.
Instead of Copy / Paste like I was doing since some minutes, I selected the text in FireFox, and drag it into the TextField to see that text inserted into the previous text (OS X, but I am able to run that application on Windows too).
My attended behavior was to only get the new (dropped) text.
Try copy an image (even a small one) and Paste it in a RTF document (from TextEdit) Youd better Paste [New from Clipboard) in Preview, then Copy, then back in TextEdit: Paste *)
For strange reason, TextEdit refuse the Paste because of one of the resources in the Clipboard.
You can also drag into the Carbon Pasteboard window to see what’s in a drag.
And to answer Emile’s question: I believe you expected that the selected text in the Xojo field gets replaced by the text you dragged into it, right? The answer is: That never happens on OSX, so the observed behavior is normal.
However, I never sw what you wrote above (excepted in Xojo IDE for example *).
BUT: it was lont time ago that I often used more applications than Firefox, TextEdit and my Xojo created application (with TEXT). So, I cannot really express fact, only opinion based on bad memory and expectation / surprise when something happens. If I’m surprised, it certainly is because this is new to me.
How do I (me, Emile Schwarz) what kind of data (and the data) there is in the Clipboard ? I use the Script Editor with:
for the string return clipboard info copied from the Script Editor. Same kind of things apply when an image is in the Clipboard.
Why do I (Emile) use the Script Editor to do that (and some other simple things) ? Because the Script Editor application runs fast (loads fast), and because I use it since AppleScript was in beta (when I was working at Apple France), back in the early 1990.
Now, everyone is free to use the product he is fluent with and that product fills its needs.
Example:
Select text in the Code Editor,
Press-click the Option-Sift keys and click into an entry in the Navigation pane.
The selected text stays and the name of the clicked object appears in the Code Editor.
I just make a simple test using TextEdit (from Apple) as the Drag and Drop Source into my very same application: the dropped text is inserted at the place I release the mouse !
Worst: a drag and drop between two windows using TextEdit (from Apple) have the same result.
BTW, using the Script editor to check the clipboard contents is not giving you all the infos. Many custom types have no “Scrap Type” code and won’t appear there. That’s what my app is for. Did you try it?
Just for understanding: since it is a custom type, how can you return useful information ?
Note: there are many years that I do not fall into a “Clipboard Custom Types” trap, so I do not recall. Usually, what AppleScript is enough for me to understand what I need.