Multiple Favorites Bars

Here is my bar....
JOperations.dop (60.2 KB)

What do you mean nothing broken there?

@showif is not working with @ctx

Try

@showif:$glob:Client
@ctx:="Favorites SHOWICONS USEQUALKEYS NOOPENINTABS AUTOCREATE BRANCH=""Client"""

Please show me an evaluator example...

J!

In the next beta we'll make it so @showif etc works with Favorites and other commands that generate dynamic buttons.

Very glad to hear!!!

Will you fix @toggle:update too?

It is so powerful! We can multiply toolbar space!

I'm looking forward to testing it!!!

Thank you!

While we can add support for that, it was never meant to work before and isn’t the method Jon suggested using.

It’s also not a case of @showif not working with @ctx. It’s @showif not working with commands that generate a list of buttons. Hide blocks were how to hide those until now.

Thank you Leo!

I managed to make it work as Jon suggested but I still have problem with the update.

I hope the new implementation fixes this too...

I also asked an Evaluator example to reduce the number of variables needed, can you give me an example?

The next beta will have @toggle:update all for this purpose.

To use the evaluator for this, instead of multiple variables you'd just have one, and set it to different values. E.g. @set glob:Faves=1, @set glob:Faves=2, etc.

Then you test it like this: @showif:=$glob:Faves==1 etc.

Note the leading $ in the test; this is required when using the evaluator to access global variables.

Excellent my friend!

These are great news!

Thank you everything!

J!

1 Like

I just installed the update and started testing...

This is beautiful!!!

I am not sure if I have one issue...
Using:

@set glob:Favs="Server"

and then

@showif:=$glob:Favs=="Server"

Is not working. Is it supposed to work with strings?

Thank you very much as always!!!
J!

When you use @set to set strings it doesn't need the quotes around it (@set is a legacy thing from before the evaluator existed). If you change it to @set glob:Favs=Server it will work.

You could also use the evaluator to set the value if you want it to be consistent:

=$glob:Favs="Server";

1 Like

When setting @set glob:Favs=Server or @set glob:Favs="Server"

This is NOT working: @showif:=$glob:Favs==Server

This is NOT working: @showif:=$glob:Favs=="Server"

This is NOT working: @showif:=$glob:Favs="Server"

I can live with 4 variables as the refresh now is working perfectly, I just reporting it to help you debug it...

J!

It works here when I try it, fwiw.

:grinning_face:

Which one is working?

Please send me a working example!

J!

Favorites command:

@showif:=$glob:Favs=="Server"
@ctx:="Favorites SHOWICONS USEQUALKEYS NOOPENINTABS AUTOCREATE BRANCH=""" + LanguageStr("FavoritesBar") + """"

Turn on:

=$glob:Favs="Server";
@toggle:update all favorites

Turn off:

@set glob:Favs=
@toggle:update all favorites

This work is working... I never tiered like this

btw there is nothing like =$glob:Favs="Server"; in the documentation.

what is the ";" doing at the end? Is it necessary?

Thank you!
J!

The = at the start is described here:

Everything after that is Evaluator code, described here:

I am sorry but I still do not understand it the way that it is written.

Maybe I am not clever enough!

I think some examples are missing in the documentation...

Thank you for you help... mission accomplished!

J!