If anyone can help me with this, it would be greatly appreciated. I'm using the following code with the intent of using controls to easily input values and units:
Slider[Dynamic[b]]
SetterBar[
Dynamic[lengthUnit], {"feet", "inches", "centimeters", "meters"}]
Quantity[Dynamic[b], Dynamic[lengthUnit]]
The above code returns "Quantity[0.,feet]"
But if I leave Dynamic out of the second argument by substituting the following line, everything works as expected:
Quantity[Dynamic[b],lengthUnit]
I suspect that this has something to do with the HoldRest attribute of Quantity and the HoldFirst attribute of Dynamic, but I'm not sure. Does anyone have any suggestions of how to make this work?
Thank you