Value listener not live with Metahopper change


I’m trying to make a Metahopper definition so I can toggle between units. The metahopper side of things works well, but when I have a HumanUI value listener, even though it is set to live, it doesn’t seem to update unless I press recompute. Is there a better way to get the values live?

190405 Metahopper (24.2 KB)


You really shouldn’t use a component like “set slider” that expires the object in question in tandem with “get connected” - you can set up a loop where you expire the thing, which expires get connected, which triggers the change, which expires the thing, ad infinitum. See my description here. You also shouldn’t ever expire a “Create Slider” object after the HUI window has launched - it will redraw the entire window. Modifications to an object in the HUI window MUST be made through a “Set” component (from the HUI Output tab). Here’s how I’d approach this:

190405 Metahopper (24.8 KB)


Thanks this is almost working. But there is a discrepancy between your results and mine. I can’t get it to toggle correctly between floats and integers. Yours shows correctly. Mine, only the GH sliders are updated, not the HumanUI sliders.

I thought it might be related to this issue. I installed the latest (unpublished) version but it didn’t fix it. Are you using a later version which I should be using? Otherwise I’m not sure what is causing this as I am using your file.

So the problem seems to be that you need to press ‘update’ on the get object component. I’m trying to work out the best way to do this.

Using the stream filter as below doesn’t work because the output is the same and so it doesn’t recompute the get object. Not sure how to go about this…

You can’t change the type of a human ui slider once it’s been created. You’ll have to leave it on float or do a custom label. You should not use update. Nothing upstream of “add elements” should ever change once the window is open.

So SetSlider from Metahopper works but not if used in conjunction with HumanUI? OK no problem, I think I can live with floats sliders.Thanks

It’s not that it doesn’t work, it’s that metahopper set slider changes an object, and changing an object upstream of a “create” component in human UI is a big no no. All changes to elements in the window must be accomplished through “set” components.

If you really want, you can build the slider value label output yourself. Right clicking on the “Create Slider” component you can disable the built-in Value label, and then using a grid you can insert appropriate labels as you see fit. It’s gonna be a lot of components though!

Custom Labels for (18.7 KB)

OK that’s good to know. I mean the reality is, it is almost impossible to set the correct value with a slider. Most of the time you double click and enter the value. But for whatever reason, a slider looks/feels better.