Hi Matthew,
>> Is this a bug?
yes. short answer: fixed in 7.08.
Now for the long answer;
JavaScript has the concept of true and false which are distinct from 1 and 0. It also has two different ways to compare values.
In JavaScript, == is the same as a clarion = - ie it converts types and makes a reasonable comparison. So in clarion if you compare the blank string with 0 it sees that as a true statement. as in
if '' = 0
! yes!
end
So in JavaScript the statement
if (a== b)
is true if a = 1 and b = true.
Unfortunately JavaScript also has an "exactly equal" test. They use === for this. so
if (a === b)
is not true if a = 1 and b = true.
Clarion has no real equivalent of this test, and no way to distinguish true from 1.
the Redactor code unfortunately tests options using === - so the parameter has to be false, not 0, and not the string "false".
I've tweaked the 7.08 code to allow for this distinction. You code (in 7.08) would be correct.
cheers
Bruce