Menu

#48 conditional formating does not work

2.0
closed
nobody
None
2023-02-27
2023-02-25
polpol
No

Hi
I try do add a condition
myvalue="test"
to change highlighting.

I get "ReferenceError: left-hand side of assignment operator is not an lvalue"

I tried to use
myvalue = 'test'
myvalue = test

no luck
version 3.0

Discussion

  • aliks-os

    aliks-os - 2023-02-25

    Please check your syntax. Take a look at the manual. You use wrong. Correct is
    [myvalue] = 'test'

    I tried to use
    myvalue = 'test'
    myvalue = test

     
  • aliks-os

    aliks-os - 2023-02-25
    • status: open --> closed
     
  • polpol

    polpol - 2023-02-25

    I have correct syntax in the condition
    I did a typo in the bugreport, the bug is still valid

    I have tried
    [myvalue] = test
    [myvalue] = 'test'
    [myvalue] = "test"
    all of those fail
    In the debug I get

    setting value  [ "myvalue" ]= QVariant(Invalid)
    Uncaught exception at line 1 : "ReferenceError: left-hand side of assignment operator is not an lvalue"
    
     
  • aliks-os

    aliks-os - 2023-02-26

    Basic of programming language like C++, JavaScipt, etc.
    For comparig you should use two == instead of =

     
  • polpol

    polpol - 2023-02-27

    That works, thanks!

     

Log in to post a comment.