

- Clipboard mac os like ditto code#
- Clipboard mac os like ditto professional#
- Clipboard mac os like ditto windows#
Windows, expected chr(13)+chr(10), and I get that. Linux, expected chr(10), chr(10) returned Mac, expected chr(10) and now I get chr(10) instead of chr(13). This will work on Windows, Linux and Mac:ĭim s As String = DefineEncoding(c.RawData("utf8"), Encodings.UTF8)
Clipboard mac os like ditto code#
So even if Xojo say “as designed” I can change my code to make it work as I expect. This way I get chr(10), the same EndOFLine copied originally to the clipboard. I reported that with a Feedback case and I know they can close it “as designed”, but know is not a problem for me, because I know that it creates the utf8 value on the clipboard, so I can get the value from there, just have to change the previous code to: Dim s As String = DefineEncoding(c.RawData("utf8"), Encodings.UTF8) I guess Xojo’s mac clipboard check the TEXT value and not the utf8 value. I expected this code to get chr(10) but always got back chr(13) on mac (Windows and Linux work ok): Dim s As String = c.Text Utf8 is also named public.utf8-plain-text and TEXT -mac-plain-text utf8 has the expected chr(10) as EndOfLine and TEXT has chr(13).

Will create 2 clipboard objects, “utf8” and “TEXT”. Thanks to my tests and ShowClipboards app, I found that this code: To my surprise, if I use Xojo’s Clipboard to put Chr(10) there it always return as Chr(13). After reading EndOfLine docs I expected EndOfLine on mac to be Chr(10), at least most of the time. It was hard for me to understand all the EndOfLine options, mostly because I never knew there were several and because I can’t see them as I can see the character ‘a’. ReplaceLineEndings is a great thing to have but I think that also helps to keep some bugs without fixing. Also I can find other ways to do things if the “as designed” is not the same as “what I expect”. Yes, test is how I understand things and once I understand them I can learn/remember things more easily. When I was able to test the code with High Sierra I was not able to reproduce the problem while with Sierra I can reproduce it at will. I understand what you are saying, I dedicated many hours documenting a “bug” that was macOS 10.12.6 problem and not Xojo’s.

Clipboard mac os like ditto professional#
I’m not a professional programmer, so testing Mojave is not a priority. If the other apps in macOS can handle the RTF copied from Styled TextArea is another issue, some may fail. Thanks to Jonathan I found out that it was easier to do just be using "RTF " and not “RTF”, so no need of “public.rtf” (but that works too). Thank you Emile for taking the time to post, all valid points and good recommendations.Ĭorrect, I just found a way to put RTF data into the clipboard for other apps to use. In a document, add a Return, an end of paragraph character and look at their visual look: they are different. Here I will use Word to explain: in Word you had (still have ?) a command to display the invisible characters. Return is not always Chr(13) End of Paragraph is not Return (even if visually it can looks the same. If you get troubles with the way the text return is done, use ReplaceLineEndings to make your code working (that is why Xojo add that Method to the Xojo IDE). I understand you are making tests for knowledge but what happens in real life use (still using Mojave compatible ap^lications / with macOS Mojave) ? You better use a pannel of current versions (Mojave) of applications: differences can occured inside of the same application thru theiits versions. You put data in the Clipboard, but you cannot do anything on how applications (Word, your example) or the OS (macOS here) deal with the Clipboard.Īlso, taking a Microsoft application for your test is not really a good example (this is a 30 years experiment result). Thanks to ShowClipboards app I found the “public.rtf” value.
Clipboard mac os like ditto windows#
= c.RawData("public.rtf")ĭon’t know if there are similar values for Windows or Linux. = c.RawData("RTF")Ĭ.AddRawData(, "public.rtf") So I did some tests.Ĭ.AddRawData(, "RTF") Only your own apps will be able to parse this data, however.Īnd I was wondering why only my own apps will be able to parse this data and not be able to paste the information on other app. This allows you to put any type of data you want in the clipboard. Raw data refers to any data that is not text or is not a picture.
