Can we have an #IfDef please?

If I recall correctly (it’s been a while) the “trouble” is parsing the string back into the checkbox array. So adding fully custom logic would prove challenging.

1 Like

So an idea could be to have a field there to enter the name of a constant.
When the project is assembled of the compiler, the constant is evaluated. It may be just true/false, so the IDE could lookup the current value it has for the constant and won’t need to run XojoScript.

Yes, the field would need to be saved and shown in the inspector, which is some work.
But it doesn’t sounds like it would take weeks.

XojoScript isn’t even needed. The compatibility string stored in the project is just dumped into the rendered code before it heads to the compiler. Generating it and using it, those are the easy parts. Parsing it back into the UI, that’s where I believe the challenge is. As it is now, I believe the string is just split on “and”, then look for wether or not each member has “not” in front of it. So adding a field the user could type into increases that complexity quite a bit. Not impossible, but… I think just low priority.

But really, it’s been a long time, I could be remembering it wrong.