How to achieve the Android clipboard functionality? lazarus / 43-Android ---------------------------------------------------------------------- ppa168 · 2012-04-23 02:46 How to achieve the Android clipboard functionality? Lazarus clipboard to no role in the Android? Clipboard.AsText:=edit1.Text;  No effect? ---------------------------------------------------------------------- felipemdc · 2012-04-23 07:14 It is not currently implemented. I will try to implement it this week. It would be good if you make a bug report so that this won't be forgotten. ---------------------------------------------------------------------- ppa168 · 2012-04-23 07:29 Thanks. Kind regards ---------------------------------------------------------------------- ppa168 · 2012-05-07 10:31 ? ---------------------------------------------------------------------- felipemdc · 2012-05-08 12:25 I am working on it, but lately I had a lot of work to do. I already started this, but then it prooved to be quite complex. More work then initially expected. But it is something important, so it is in my ToDo ---------------------------------------------------------------------- ppa168 · 2012-05-09 02:04 Thank you. Congratulation for great work! ---------------------------------------------------------------------- felipemdc · 2012-05-09 06:46 Thanks. Ok, so now I implemented it completely, but for a misterious reason it does not work. Maybe you can help me find what is wrong. Update to the latest subversion and check in this file: http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/lcl/interfaces/cust omdrawn/customdrawnwinapi_android.inc?view=markup&root=lazarus From line 155 there are the 2 routines relevant to the issue here: ClipboardGetData (gets data from the clipboard) and ClipboardSetOwnership (sends data) Neither works (actually data sending is crashing right now in the final part). ---------------------------------------------------------------------- ppa168 · 2012-05-09 08:20 ok ---------------------------------------------------------------------- felipemdc · 2012-05-09 08:27 With subversion: http://wiki.lazarus.freepascal.org/index.php/Getting_Lazarus ---------------------------------------------------------------------- ppa168 · 2012-05-09 08:36 run ---------------------------------------------------------------------- felipemdc · 2012-05-09 08:40 You probably only copied 1 file. You can't just copy a new version of 1 file from the LCL like that. You need to upgrade your entire Lazarus. By the way, now (revision: 37226) I fixed the copy issue. The following code now works for me: procedure TForm1.Button1Click(Sender: TObject); begin   ClipBoard.AsText:='Button1Clicked'; end; And in other Android apps I can paste that =) The opposite direction still doesn't work if the data comes from Android, it gets a #0 string. No idea why, but in your original post you asked for copy support anyway, not paste. ---------------------------------------------------------------------- ppa168 · 2012-05-09 08:45 Where to download Revision: 37226? ---------------------------------------------------------------------- felipemdc · 2012-05-09 08:53 How did you install the one that you are using now? Which Lazarus version are you using now? ---------------------------------------------------------------------- ppa168 · 2012-05-09 09:09 The current version is 36740 ---------------------------------------------------------------------- ppa168 · 2012-05-09 09:45 Only found version is 37216 ---------------------------------------------------------------------- felipemdc · 2012-05-09 11:19 If you are using the snapshots you need to wait till tomorrow, when a new snapshot will be generated. ---------------------------------------------------------------------- felipemdc · 2012-05-09 14:45 Ok, now both directions of clipboard copy+paste are working =) ---------------------------------------------------------------------- ppa168 · 2012-05-13 03:19 now both directions of clipboard copy+paste are working =)   Ok Very good New version of the: 1.For example edit1.text: = edit.text + '2 'does not automatically display content, you need the mouse to display click on edit1 input box. If to continue edit1.text: = edit.text + '3 'can not be added, still shows 2 add text plus. 2.procedure TForm1.Button1Click(Sender: TObject); begin     edit1.Text:='';     edit2.Text:=''; end;  Real-time display input change,Need to mouse click to see. ---------------------------------------------------------------------- ppa168 · 2012-05-13 04:14 3.edit1.PasswordChar:=*;      no effect 4.Button2.Enabled:=false;      no effect ---------------------------------------------------------------------- felipemdc · 2012-05-13 18:45 Please report each of the issues individually in the bug tracker. thanks ---------------------------------------------------------------------- ppa168 · 2012-05-15 00:55 New problems The calculation is not correct, Edit control ---------------------------------------------------------------------- felipemdc · 2012-05-15 10:19 So, what about the bug reports? Quote from: ppa168 on May 15, 2012, 02:55:35 amThe calculation is not correct, Edit control Please open a bug report about this and be more specific. From this description I haven't understood anything. Attaching screenshots and clearly describing reproduction steps, the actual result and the expected result always helps.