Evaluator: Button Scope mismatch (2)

Hello! o)

Took me some time to figure out why this error message in the console came up..

I was thinking, what "scope" is he referring to? I added some more brackets in the condition,checked the rest of the button, which does not have any real code, just toggles icon, label and colour of the button.

Some time later I was annoyed, because I wanted to use the console to see output of mine, so I checked again.. turns out, the cause of the issue was the missing bracket at the end, which emnraces the ternary "construction".

@color:= return ((selfiles+seldirs) > 1 ? { text="default"; back="#ff3333"; } : { text="default"; back="default"; } // ")" bracket missing here

Maybe there is a way to enhance on the error message or parsing a little bit?
Just an idea, because I really had no clue what the issue could have been. If you get a "scope" error message, you don't watch for brackets?! o)

Thank you and have a nice evening everyone! o)

While I am at it, would it be possible to print the name of the toolbar / menu where the problematic button is located? I only have two buttons currently in which I test-drive some evaluator stuff now and then, but if I had more.. mhh, I would not really know where to start looking for the problem.

I remember you already added some kind of "source" information to Evaluator error messages, but maybe we need even more? I can't really tell, I am an Evaluator beginner.

And.. do you know, what is the "(2)" in the error message referring to?
"Button Scope mismatch (2)"

Thanks! o)

Thanks for pointing that out; the extra info got lost recently when the Task Manager was added. It'll be back in the next update.

The 2 is simply an internal error code, means nothing really :slight_smile:

Ok, sounds good, thank you! o)