inconsistent syntax highlighting in table examples
Describe the bug
https://www.cogentcore.org/core/table
Just providing some feedback. I did not see an issue ticket referring to this already.
How to reproduce
view https://www.cogentcore.org/core/table
Example code
Relevant output
Platform
Web
I note also that core.NewTable...SetReadOnly(true) does not set boolean table fields as read only.
It's still possible to toggle the state of the boolean table field with SetReadOnly(true)
On further inspection, I believe the syntax highlighting was intentionally done that way for SetReadOnly in the docs
@0pcom Thank you for filing this issue. That syntax highlighting is indeed incorrect and is a bug in our parser and the way it handles chained functions. We will probably be switching our parsing logic when we implement LSP in Cogent Code (https://github.com/cogentcore/cogent/issues/305), which we will hopefully have more time for soon. I will keep this issue open as it is an issue with Cogent Core.
The read only bool fields issue is #677; I thought I had fixed most of the problems with that, but I can fix the switch logic now.
I fixed the read only bool fields issue in #1495.
That syntax highlighting is indeed incorrect and is a bug in our parser and the way it handles chained functions.
oh, my mistake, I thought it was intentional right there because of the SetReadOnly to indicate that basically the data there was not going to change from the user input.
as a follow-up question, is it possible or will it be possible to put widgets in a table?
Yes, it is possible to put widgets in a table. See my response here: https://github.com/cogentcore/core/discussions/1494#discussioncomment-12727294. Please let me know if you have any further questions.