TextArea does not support the clipboard (RISCOS Cloverleaf)
Sergey Lentsov (8268) 63 posts |
Hello, Me needs to use multiline input control and I take the TextArea but it does seems not supporting the clipboard, at least Ctrl-C, Ctrl-V does not work on it. |
Jean-Michel BRUCK (3009) 362 posts |
Yes we can :-) To test…. |
Julie Stamp (8365) 474 posts |
Clipboard support for TextGadgets is in the big list, so if you’re lucky it might appear through the bounty work at some point. |
Steve Drain (222) 1620 posts |
Using the Clipboard module, it turns out that cut and paste in a TextArea is not too difficult 1, but I had to learn the module first. The available documentation covers much more than Fred Graute’s implementation of CaP in his Clipboard module, so as part of my learning I have wrtten a small StrongHelp manual for it. This is with Fred for checking, and will be available “real soon”. This Clipboard module is only available by asking Fred, yet is is a ROOL project. It is nowhere here, and seems to be abandoned. Can I urge that it be made available and then worked on to implement the rest of the specification. It would be a real boon. My TextArea demo app with CaP is not really suitable for publication just yet, but it does ^Z ^X ^C ^V ^K ^A just as you would expect, and ^S to pop-up a SaveAs to drag the whole text or a selection. 1 TextArea has some awkard subtext bugs that have to be worked around. |
Steve Drain (222) 1620 posts |
I think I am ready to let it out in the wild, but it may be a fragile beast. As it uses my Oobi (Object Oriented BASIC Interface) system the code might look a little strange. ;-) |
Julie Stamp (8365) 474 posts |
Oobi doesn’t work :-( When I try to run it, it gives abort on data transfer at &FC055A44. I went through the !Run line-by-line and it happens in Oobi.Base. The Debugger dump isn’t very helpful, but it mentions FileSwitch, ResourceFS, and lots of Recursion in MessageTrans. (OS 5.28/RPCEmu) |
Steve Drain (222) 1620 posts |
Oh dear! I said it might be fragile. ;-( I am running on a mini.m with 5.25 still. Those errors make some sense. Was is just as you double-clicked Oobi? If others have similar problems on real hardware I will withdraw it and make a version using the original libraries. More memory, but what the h**l. ;-) |
Julie Stamp (8365) 474 posts |
Yes. I just tried it on RPi 5.28 and Oobi runs fine. |
Steve Drain (222) 1620 posts |
That is a relief. And TextArea? |
Julie Stamp (8365) 474 posts |
Kind of … I mean it runs, but sometimes ^X does a paste, and I occaisionally get “Too many nested structures” at line 531 in Toolbox. I am using VNC though so I don’t know if that makes any difference. |
Steve Drain (222) 1620 posts |
My fault, I think. I am using DIM LOCAL for the temporary buffer needed when copying and pasting, I am asking for the size, but I have forgotten to allow for the terminator that has to be added. This works, on average, 3 out of 4 times. On the fourth I end up overwriting the BASIC stack. ;-( I shall redo the code, with some other additions, and see how things go. |
Steve Drain (222) 1620 posts |
There is an updated TextArea test app which might have some of those bugs cleared up. There is a StrongHelp manual for the Clipboard which might be useful. It is included in the app above. |