Custom Menu using named query

Very true. As ever, don't write checks your body brain can't cash. I do think that structuring the code to 'look' the same as the JSON representation helps, at least. But it is definitely a conceptual hurdle to get over. Not much helping that - either you deal with learning list comprehensions, or you deal with learning about mutable references :man_shrugging: .

It's interesting to see this, I placed a print statement before the append function, and this is what I see:

17:47:58.589 [Browser Thread: 52554] INFO Perspective.Designer.Workspace - [{'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '2'}, 'target': '1', 'items': []}]
17:47:58.589 [Browser Thread: 52554] INFO Perspective.Designer.Workspace - [{'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '3'}, 'target': '1', 'items': []}, {'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '3'}, 'target': '2', 'items': []}]
17:47:58.589 [Browser Thread: 52554] INFO Perspective.Designer.Workspace - [{'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '4'}, 'target': '1', 'items': []}, {'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '4'}, 'target': '2', 'items': []}, {'showHeader': True, 'navIcon': {'path': ''}, 'label': {'icon': {'path': ''}, 'text': '4'}, 'target': '3', 'items': []}]

My understanding was that only one copy is polling on the gateway, and the clients view that.

If polling is on and two clients are looking at a table with data from the query, then the query is only polled once, not twice when polling the database. Or is that not right?

That isn't right.

  • If the binding is on a session property, then it would be 1 poll for every client session.
  • If the binding is on a view property, then it would be 1 poll for every client with that view open. (I believe).
  • If it is a query tag then it would be on the gateway and there would only be 1 poll for the system.

You're forgetting about cached named queries which I don't really use, since most of my named queries use parameters which mean caching is almost always defeated, unless clients happen to pick the exact same parameters within the cache period, very unlikely. However, if the params are all the same or you don't have params, then it's probably fairly close to polling once with the other clients reading the cache

I'm in the same boat as you, which is why I didn't think about it.