![]() I ran the "Clipboard Analizer" ( clipanalizer) program. ![]() I think, it is a similar case like the following (see next paragraph and also the attached screenshot). Sometimes, it does not crash, but in this case it displays nothing. You can then get a meaningfulīacktrace from your debugger if you break on the gdk_x_error() function.) To debug your program, run it with the -sync command line That is, you will receive the error a while after causing it. (Note to programmers: normally, X errors are reported asynchronously (Details: serial 9826 error_code 5 request_code 24 minor_code 0) The error was 'BadAtom (invalid Atom parameter)'. This probably reflects a bug in the program. The program 'clipbex' received an X Window System error. Gtk-Message: 15:58:49.041: Failed to load module "canberra-gtk-module" Of course this program was written with Lazarus, and when Lazarus has a bug in clipboard handling this program will have this bug, too.Ī similar program is Jesus Reyes' "clipanalizer" found on CCR: Note that for compilation you need the packages KControls and RichMemo which you can install easily via Online-Package-Manager. The minimum requirement for pasting text into the IDE is a text/plain format (CF_TEXT). After pressing the "Refresh" button it lists all formats contained in the clipboard and displays the clipboard content for each format as a hex dump or, when possible, in a memo, RichMemo, or image. ![]() To further investigate the clipboard you could also try my program "Clipboard Explorer" ( ). Maybe not relevant, but you mention Ctrl+V: if you selected classic keyboard scheme in the IDE options / Keyboard mapping (like I do) then this will never work, you must use Shift+Ins instead. There is a function ClipboardFormatToMimeType that may map the format to a string. When you copy the unknown text, iterate through the formats, and list them. ![]() Property Formats: TClipboardFormat read GetFormats Property FormatCount: Integer read GetFormatCount I am not particularly familiar with the clipboard code. You can report a bug, but without further info, I don't know if anyone will be able to do much about it. It is possible that some of the apps you use, store their text to the clipboard with a format the lcl does not understand. AsText obviously will not return an image from the clipboard. It uses Clipboard.AsText (with some additions).Īfter your test, the problem is in Clipboard.AsText and not in the "some additions" part.Ĭlipboard can contain text and other formats. SynEdit (the source editor) is not a native control. Because Memo is a native control.Ĭlipboard.AsText is the LCL access to the clipboard. ![]() Memo context menu paste, is handled by gtk/qt. But, the context menu's Paste command or Ctrl+V on Lazarus editor does not work. Please note that, when this problem occurs (that is, when I cannot paste anything to Lazarus editor or in the test program), I can paste the data to another application, like LO Writer, Atom editor, Firefox, etc.īTW when this problem occurs, the context menu's Paste command or Ctrl+V on the test program's Memos works. I think Lazarus and the simple test program use the same code (libraries etc.), so they behave the same. And actually when the problem occurs with the Lazarus editor, the same happens with the program: ClipBoard.AsText and PrimarySelection.AsText paste empty string I verified this by using: Label1.Caption := IntToStr(Length(ClipBoard.AsText)). However, these have nothing to do with my problem. SecondarySelection.AsText does nothing (empty string). PrimarySelection.AsText "pastes" data that is selected in another application. As you say: ClipBoard.AsText pastes data which was copied to the clipboard before. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |