Check for text-selection support in the WIMP
Michael Drake (88) 336 posts |
Is there a recommended way to check for text-selection support in writable icons in the WIMP, that will work for any OS version. (Including Select/Adjust/SIX). |
||||||
Martin Avison (27) 1494 posts |
Yes. In BASIC, you can use:
But it also now works on RO5.28 |
||||||
Michael Drake (88) 336 posts |
Ah, thanks for putting me onto XWimp_ReadSysInfo! OSLib has a helper for that, so I added a feature detection function for NetSurf. I made the URL bar drag handling only initiate a URL drag save if the WIMP doesn’t support text selection. However, on the version of RISC OS I got from the RPCEmu RISC OS Direct bundle (5.27 (19-Mar-29)) I get: xwimpreadsysinfo_text_selection: 0x29e Bad parameter passed to Wimp in R0 Is that expected for this version of the wimp? Text selection is visibly working in other writable icons but not in the NetSurf URL bar. Does text selection in the URL bar work for anyone else with a newer OS version and NetSurf development build #5220 or newer? BTW, the ROOL docs say:
But the ROL docs explain it. |
||||||
Martin Avison (27) 1494 posts |
That does not have the C’n’P changes – it was a later change to 5.27. The addition of the SysInfo change was even later, and I suspect the docs have not caught up yet. That is why I specifically referenced the stable 5.28 release. |
||||||
Michael Drake (88) 336 posts |
OK, great, thanks! Sounds like it should be working for anyone with a recent enough OS build. :) |
||||||
Steve Pampling (1551) 8170 posts |
You can just drop in a 5.28 (or a 5.29 beta) ROM into the “ROMS” directory to update that. Slightly unfortunate timing for Peter in that he tested that bundle before the C’n’P changes were integrated. |
||||||
Steve Fryatt (216) 2105 posts |
It does have the C’n’P changes, doesn’t it? IIRC, the problem was that support for Wimp_ReadSysInfo 21 was added in later, when the ROL documentation surfaced. So there will be some nightly builds between the end of 2019 and sometime in the summer of 2020 where icons support selections, but Wimp_ReadSysInfo 21 isn’t recognised. I’m not sure there’s a sensible way around that, however, beyond ignoring it. |
||||||
Michael Drake (88) 336 posts |
Thanks for the tips. Unfortunately I tried the latest ROM, and text selection in the URL bar still isn’t working, so I’m not sure what’s up. The “xwimpreadsysinfo_text_selection: 0×29e Bad parameter passed to Wimp in R0” has gone away. |